Node class

Node class

Represents an element in the scene graph. A scene graph is a tree of Node objects. The tree management services are self contained in this class. Note the Aspose.3D SDK does not test the validity of the constructed scene graph. It is the responsibility of the caller to make sure that it does not generate cyclic graphs in a node hierarchy. Besides the tree management, this class defines all the properties required to describe the position of the object in the scene. This information include the basic Translation, Rotation and Scaling properties and the more advanced options for pivots, limits, and IK joints attributes such the stiffness and dampening. When it is first created, the Node object is “empty” (i.e: it is an object without any graphical representation that only contains the position information). In this state, it can be used to represent parents in the node tree structure but not much more. The normal use of this type of objects is to add them an entity that will specialize the node (see the “Entity”). The entity is an object in itself and is connected to the the Node. This also means that the same entity can be shared among multiple nodes. Camera, Light, Mesh, etc… are all entities and they all derived from the base class Entity.

Inheritance: NodeSceneObjectA3DObject

The Node type exposes the following members:

Constructors

ConstructorDescription
__init__(self)Initializes a new instance of the Node class.
__init__(self, name, entity)Initializes a new instance of the Node class.
__init__(self, name)Initializes a new instance of the Node class.

Properties

PropertyDescription
nameGets or sets the name.
propertiesGets the collection of all properties.
sceneGets the scene that this object belongs to
asset_infoPer-node asset info
visibleGets or sets to show the node
child_nodesGets the children nodes.
entityGets or sets the first entity attached to this node, if sets, will clear other entities.
excludedGets or sets whether to exclude this node and all child nodes/entities during exporting.
entitiesGets all node entities.
meta_datasGets the meta data defined in this node.
materialsGets the materials associated with this node.
materialGets or sets the first material associated with this node, if sets, will clear other materials
parent_nodeGets or sets the parent node.
transformGets the local transform.
global_transformGets the global transform.

Methods

MethodDescription
remove_property(self, property)Removes a dynamic property.
remove_property(self, property)Remove the specified property identified by name
create_child_node(self)Creates a child node
create_child_node(self, node_name)Create a new child node with given node name
create_child_node(self, entity)Create a new child node with given entity attached
create_child_node(self, node_name, entity)Create a new child node with given node name
create_child_node(self, node_name, entity, material)Create a new child node with given node name, and attach specified entity and a material
get_child(self, index)Gets the child node at specified index.
get_child(self, node_name)Gets the child node with the specified name
get_property(self, property)Get the value of specified property
set_property(self, property, value)Sets the value of specified property
find_property(self, property_name)Finds the property.
It can be a dynamic property (Created by CreateDynamicProperty/SetProperty)
or native property(Identified by its name)
merge(self, node)Detach everything under the node and attach them to current node.
evaluate_global_transform(self, with_geometric_transform)Evaluate the global transform, include the geometric transform or not.
get_bounding_box(self)Calculate the bounding box of the node
add_entity(self, entity)Add an entity to the node.
add_child_node(self, node)Add a child node to this node
select_single_object(self, path)Select single object under current node using XPath-like query syntax.
select_objects(self, path)Select multiple objects under current node using XPath-like query syntax.

See Also