prev up next

Szene-Baum bauen

Die eingelesenen Elemente (XML-Knoten mit Attributen) werden in X3DObject-Objekte umgewandelt und gemäß ihrer XML-Baumstruktur in einen Baum eingefügt.

Hier eine Ausgabe des rohen X3DBaums:

java -cp ../..:org.apache.jar cgp.reader.X3DReader pyramid.x3d
Dokumentanfang
Dokumentende
Name: X3D      Attributzahl: 1      Kinderzahl: 2
  Attribute: version      Wert: 3.0
ROOT

Name: head      Attributzahl: 0      Kinderzahl: 7      Vater: X3D

Name: meta      Attributzahl: 2      Kinderzahl: 0      Vater: head
  Attribute: content      Wert: pyramid.x3d
  Attribute: name      Wert: filename

Name: meta      Attributzahl: 2      Kinderzahl: 0      Vater: head
  Attribute: content      Wert: MV4204 class
  Attribute: name      Wert: author

Name: meta      Attributzahl: 2      Kinderzahl: 0      Vater: head
  Attribute: content      Wert: 8 July 2000
  Attribute: name      Wert: created

Name: meta      Attributzahl: 2      Kinderzahl: 0      Vater: head
  Attribute: content      Wert: 5 January 2001
  Attribute: name      Wert: revised

Name: meta      Attributzahl: 2      Kinderzahl: 0      Vater: head
  Attribute: content      Wert: Constructing a Pyramid geometric primitive in order
                                to show use of points and coordinate indices.
  Attribute: name      Wert: description

Name: meta      Attributzahl: 2      Kinderzahl: 0      Vater: head
  Attribute: content      Wert: http://www.web3D.org/TaskGroups/x3d/translation/
                                examples/course/pyramid.x3d
  Attribute: name      Wert: url

Name: meta      Attributzahl: 2      Kinderzahl: 0      Vater: head
  Attribute: content      Wert: X3D-Edit, http://www.web3D.org/TaskGroups/x3d/
                                translation/README.X3D-Edit.html
  Attribute: name      Wert: generator

Name: Scene      Attributzahl: 2      Kinderzahl: 3      Vater: X3D
  Attribute: containerField      Wert: 
  Attribute: class      Wert: 

Name: Viewpoint      Attributzahl: 11      Kinderzahl: 0      Vater: Scene
  Attribute: description      Wert: Pyramid
  Attribute: orientation      Wert: 0 1 0 .2
  Attribute: position      Wert: 4 0 25
  Attribute: fieldOfView      Wert: 0.785398
  Attribute: jump      Wert: true
  Attribute: bind      Wert: false
  Attribute: bindTime      Wert: -1
  Attribute: isBound      Wert: false
  Attribute: centerOfRotation      Wert: 0 0 0
  Attribute: containerField      Wert: children
  Attribute: class      Wert: 

Name: NavigationInfo      Attributzahl: 10      Kinderzahl: 0      Vater: Scene
  Attribute: type      Wert: EXAMINE ANY
  Attribute: avatarSize      Wert: 0.25 1.6 0.75
  Attribute: headlight      Wert: true
  Attribute: speed      Wert: 1
  Attribute: visibilityLimit      Wert: 0
  Attribute: bind      Wert: false
  Attribute: bindTime      Wert: -1
  Attribute: isBound      Wert: false
  Attribute: containerField      Wert: children
  Attribute: class      Wert: 

Name: Transform      Attributzahl: 9      Kinderzahl: 1      Vater: Scene
  Attribute: translation      Wert: 0 -5 0
  Attribute: center      Wert: 0 0 0
  Attribute: rotation      Wert: 0 0 1 0
  Attribute: scale      Wert: 1 1 1
  Attribute: scaleOrientation      Wert: 0 0 1 0
  Attribute: bboxCenter      Wert: 0 0 0
  Attribute: bboxSize      Wert: -1 -1 -1
  Attribute: containerField      Wert: children
  Attribute: class      Wert: 

Name: Shape      Attributzahl: 2      Kinderzahl: 2      Vater: Transform
  Attribute: containerField      Wert: children
  Attribute: class      Wert: 

Name: IndexedFaceSet      Attributzahl: 9      Kinderzahl: 1      Vater: Shape
  Attribute: coordIndex      Wert: 0 1 2 -1, 1 3 2 -1, 2 3 0 -1, 3 1 0
  Attribute: ccw      Wert: true
  Attribute: colorPerVertex      Wert: true
  Attribute: convex      Wert: true
  Attribute: creaseAngle      Wert: 0
  Attribute: normalPerVertex      Wert: true
  Attribute: solid      Wert: true
  Attribute: containerField      Wert: geometry
  Attribute: class      Wert: 

Name: Coordinate      Attributzahl: 3      Kinderzahl: 0      Vater: IndexedFaceSet
  Attribute: point      Wert: 0 0 0, 10 0 0, 5 0 8.3, 5 8.3 2.8
  Attribute: containerField      Wert: coordinate
  Attribute: class      Wert: 

Name: Appearance      Attributzahl: 2      Kinderzahl: 1      Vater: Shape
  Attribute: containerField      Wert: appearance
  Attribute: class      Wert: 

Name: Material      Attributzahl: 8      Kinderzahl: 0      Vater: Appearance
  Attribute: diffuseColor      Wert: 0.8 0.8 0.2
  Attribute: specularColor      Wert: 0 0 0.5
  Attribute: ambientIntensity      Wert: 0.2
  Attribute: emissiveColor      Wert: 0 0 0
  Attribute: shininess      Wert: 0.2
  Attribute: transparency      Wert: 0
  Attribute: containerField      Wert: material
  Attribute: class      Wert: 


prev up next