Node

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.

Methods

constructor

NameDescription
constructor()Initializes a new instance of the Node class.

Result:


constructor_overload

NameDescription
constructor_overload(name, entity)Initializes a new instance of the Node class.

Parameters:

NameTypeDescription
nameStringName.
entityEntityDefault entity.

Result:


constructor_overload$2{#constructor_overload$2}

NameDescription
constructor_overload$2(name)Initializes a new instance of the Node class.

Parameters:

NameTypeDescription
nameStringName.

Result:


getAssetInfo

NameDescription
getAssetInfo()Per-node asset info

Result:


setAssetInfo

NameDescription
setAssetInfo(value)Per-node asset info

Result:


getVisible

NameDescription
getVisible()Gets or sets to show the node

Result:


setVisible

NameDescription
setVisible(value)Gets or sets to show the node

Result:


getChildNodes

NameDescription
getChildNodes()Gets the children nodes. The nodes.

Result:


getEntity

NameDescription
getEntity()Gets or sets the first entity attached to this node, if sets, will clear other entities. The node entity.

Result:


setEntity

NameDescription
setEntity(value)Gets or sets the first entity attached to this node, if sets, will clear other entities. The node entity.

Result:


getExcluded

NameDescription
getExcluded()Gets or sets whether to exclude this node and all child nodes/entities during exporting.

Result:


setExcluded

NameDescription
setExcluded(value)Gets or sets whether to exclude this node and all child nodes/entities during exporting.

Result:


getEntities

NameDescription
getEntities()Gets all node entities. The node entities.

Result:


getMetaDatas

NameDescription
getMetaDatas()Gets the meta data defined in this node. The meta datas.

Result:


getMaterials

NameDescription
getMaterials()Gets the materials associated with this node. The materials.

Result:


getMaterial

NameDescription
getMaterial()Gets or sets the first material associated with this node, if sets, will clear other materials The material.

Result:


setMaterial

NameDescription
setMaterial(value)Gets or sets the first material associated with this node, if sets, will clear other materials The material.

Result:


getParentNode

NameDescription
getParentNode()Gets or sets the parent node. The parent node.

Result:


setParentNode

NameDescription
setParentNode(value)Gets or sets the parent node. The parent node.

Result:


getTransform

NameDescription
getTransform()Gets the local transform. The transform.

Result:


getGlobalTransform

NameDescription
getGlobalTransform()Gets the global transform. The global transform.

Result:


getScene

NameDescription
getScene()Gets the scene that this object belongs to

Result:


getName

NameDescription
getName()Gets or sets the name. The name.

Result:


setName

NameDescription
setName(value)Gets or sets the name. The name.

Result:


getProperties

NameDescription
getProperties()Gets the collection of all properties.

Result:


createChildNode

NameDescription
createChildNode()Creates a child node

Result: Node


merge

NameDescription
merge(node)Detach everything under the node and attach them to current node.

Parameters:

NameTypeDescription
nodNodenull

Result: Node


createChildNode

NameDescription
createChildNode(nodeName)Create a new child node with given node name

Parameters:

NameTypeDescription
nodeNameStringThe new child node’s name

Result: Node


createChildNode

NameDescription
createChildNode(entity)Create a new child node with given entity attached

Parameters:

NameTypeDescription
entityEntityDefault entity attached to the node

Result: Node


createChildNode

NameDescription
createChildNode(nodeName, entity)Create a new child node with given node name

Parameters:

NameTypeDescription
nodeNameStringThe new child node’s name
entityEntityDefault entity attached to the node

Result: Node


createChildNode

NameDescription
createChildNode(nodeName, entity, material)Create a new child node with given node name, and attach specified entity and a material

Parameters:

NameTypeDescription
nodeNameStringThe new child node’s name
entityEntityDefault entity attached to the node
materialMaterialThe material attached to the node

Result: Node


evaluateGlobalTransform

NameDescription
evaluateGlobalTransform(withGeometricTransform)Evaluate the global transform, include the geometric transform or not.

Parameters:

NameTypeDescription
withGeometricTransformbooleanWhether the geometric transform is needed.

Result: Matrix4


getChild

NameDescription
getChild(index)Gets the child node at specified index.

Parameters:

NameTypeDescription
indexNumberIndex.

Result: Node


getChild

NameDescription
getChild(nodeName)Gets the child node with the specified name

Parameters:

NameTypeDescription
nodeNameStringThe child name to find.

Result: Node


accept

NameDescription
accept(visitor)Walks through all descendant nodes(including the current node) and call the visitor with the node. Visitor can break the walk-through by returning false

Parameters:

NameTypeDescription
visitorNodeVisitorVisitor callback to visit the node

Result: boolean


toString

NameDescription
toString()Gets the string representation of this node.

Result: String


getBoundingBox

NameDescription
getBoundingBox()Calculate the bounding box of the node

Result: BoundingBox


addEntity

NameDescription
addEntity(entity)Add an entity to the node.

Parameters:

NameTypeDescription
entityEntityThe entity to be attached to the node

Result: BoundingBox


addChildNode

NameDescription
addChildNode(node)Add a child node to this node

Parameters:

NameTypeDescription
nodeNodeThe child node to be attached

Result: BoundingBox


selectSingleObject

NameDescription
selectSingleObject(path)Select single object under current node using XPath-like query syntax.

Parameters:

NameTypeDescription
patStringnull

Result: Object


selectObjects

NameDescription
selectObjects(path)Select multiple objects under current node using XPath-like query syntax.

Parameters:

NameTypeDescription
patStringnull

Result: 0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]


removeProperty

NameDescription
removeProperty(property)Removes a dynamic property.

Parameters:

NameTypeDescription
propertyPropertyWhich property to remove

Result: boolean


removeProperty

NameDescription
removeProperty(property)Remove the specified property identified by name

Parameters:

NameTypeDescription
propertStringnull

Result: boolean


getProperty

NameDescription
getProperty(property)Get the value of specified property

Parameters:

NameTypeDescription
propertyStringProperty name

Result: Object


setProperty

NameDescription
setProperty(property, value)Sets the value of specified property

Parameters:

NameTypeDescription
propertyStringProperty name
valueObjectThe value of the property

Result: Object


findProperty

NameDescription
findProperty(propertyName)Finds the property. It can be a dynamic property (Created by CreateDynamicProperty/SetProperty) or native property(Identified by its name)

Parameters:

NameTypeDescription
propertyNameStringProperty name.

Result: Property