Object Hierarchy | Related C++ Class: X3DObject
X3DObject
v1.0
The X3DObject object represents a 3D-object inside the active
Scene.
An X3DObject can have other X3DObjects nested beneath it as
"children". This parent/child relationship does not imply any
relationship of the objects' positions in physical space, but
instead establishes a logical hierarchy. For example a skeleton is
made up of a hierarchy of ChainRoot,
ChainBone and ChainEffector X3DObjects. The Scene
Explorer view shows this hierarchy. The top node of this tree is
the Scene Root, which is a Model, and
hence an X3DObject itself. X3DObject.Children and SIObject.Parent are available for
navigating through this tree.
There are several methods that can be used to create the different
kinds of X3DObject objects. These generally begin with "Add"; for
example, the X3DObject.AddGeometry method
creates the specified kind of geometry and parents it under the
current X3DObject. For a complete list, see the Methods table
below.
An X3DObject is not a monolithic object. Instead its state is
represented by a hierarchy of nested objects. Most of these nested
objects are Property objects. For
example the position and other transformation information is
available from the Kinematics
property. The Material used by the
object also appears as a property.
Polygon Meshes and other X3DObjects with a shape have a nested
Geometry object which is accessible via
X3DObject.ActivePrimitive.Geometry.
The Geometry in turn could potentially have Clusters and ClusterProperty objects.
var x3dObj, x3dObjSphere; x3dObj = Application.ActiveSceneRoot; x3dObjSphere = x3dObj.AddGeometry( "Sphere", "MeshSurface", "MySphere" ); Application.LogMessage( "Sphere object's name: " + x3dObjSphere.Name ) ; // Expected output: //INFO : Sphere object's name: MySphere |
x3dObj = Application.ActiveSceneRoot x3dObjSphere = x3dObj.AddGeometry( "Sphere", "MeshSurface" ) Application.LogMessage( "Sphere object's name: " + x3dObjSphere.Name ) # Expected output: #INFO : Sphere object's name: MySphere |
dim x3dObj, x3dObjSphere set x3dObj = Application.ActiveSceneRoot set x3dObjSphere = x3dObj.AddGeometry( "Sphere", "MeshSurface" ) Application.LogMessage "Sphere object's name: " & x3dObjSphere.Name ' Expected output: 'INFO : Sphere object's name: MySphere |