X3DObject
 
 
 

X3DObject

Object Hierarchy | Related C++ Class: X3DObject

Inheritance

SIObject

ProjectItem

SceneItem

X3DObject

Introduced

v1.0

Description

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.

Methods

Add2DChain Add3DChain AddAnnotation AddCamera
AddCameraRig AddChild AddControl AddCustomOp
AddCustomProperty AddFxTree AddGeometry AddICEAttribute
AddLattice AddLight AddLightRig AddMaterial
AddModel AddNull AddNurbsCurve AddNurbsCurveList
AddNurbsCurveList2 AddNurbsSurface AddNurbsSurfaceMesh AddNurbsSurfaceMesh2
AddPolygonMesh AddPrimitive AddProperty AddScriptedOp
AddScriptedOpFromFile AnimatedParameters2 ApplyEnvelope BelongsTo operator
EvaluateAt FindChild FindChild2 FindChildren
FindChildren2 GetActivePrimitive2 GetActivePrimitive3 GetBoundingBox
GetICEAttributeFromName GetLocalPropertyFromName GetLocalPropertyFromName2 GetModels2
GetPropertyFromName GetPropertyFromName2 GetStaticKinematicState operator HasStaticKinematicState operator
IsA IsAnimated2 IsClassOf operator IsEqualTo operator
IsKindOf IsLocked operator IsNodeAnimated IsSelected operator
LockOwners NodeAnimatedParameters RemoveChild RemoveFromParent
RemoveICEAttribute SetAsSelected operator SetCapabilityFlag operator SetLock
SetMaterial ShapeAnimatedClusters TaggedParameters UnSetLock

Properties

ActivePrimitive Application BranchFlag operator Capabilities operator
Categories Children Envelopes EvaluationID
Families operator FullName operator Help HierarchicalEvaluationID
ICEAttributes Kinematics LocalProperties LocalRotation
LocalScaling LocalTranslation LockLevel operator LockMasters operator
LockType operator Material Materials Model
Models Name operator NestedObjects ObjectID
Origin OriginPath Owners PPGLayout operator
Parameters operator Parent Parent3DObject Primitives
Properties Selected operator Type operator  
       

Examples

1. JScript Example

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

2. Python Example

x3dObj = Application.ActiveSceneRoot
x3dObjSphere = x3dObj.AddGeometry( "Sphere", "MeshSurface" )
Application.LogMessage( "Sphere object's name: " + x3dObjSphere.Name )
# Expected output: 
#INFO : Sphere object's name: MySphere

3. VBScript Example

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