Node

Overview

Node is a class in Aspose.3D FOSS for .NET. Inherits from: SceneObject.

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.

This class provides 18 methods for working with Node objects in .NET programs. Available methods include: A3DObject, Accept, AddChildNode, AddEntity, CreateChildNode, EvaluateGlobalTransform, FindProperty, GetBoundingBox, GetChild, GetProperty, Merge, Node, and 6 additional methods. All public members are accessible to any .NET application after installing the Aspose.3D FOSS for .NET package. Properties: AssetInfo, ChildNodes, Entities, Entity, Excluded, GlobalTransform, and 9 more.

Properties

NameTypeAccessDescription
AssetInfoAssetInfo?Read/WriteGets or sets the asset info.
VisibleboolRead/WriteGets or sets the visible.
ChildNodesIList<Node>ReadGets the child nodes.
EntityEntity?Read/WriteGets or sets the entity.
ExcludedboolRead/WriteGets or sets the excluded.
EntitiesIList<Entity>ReadGets the entities.
MetaDatasIList<CustomObject>ReadGets the meta datas.
MaterialsIList<Shading.Material>ReadGets the materials.
MaterialShading.Material?Read/WriteGets or sets the material.
ParentNodeNode?Read/WriteGets or sets the parent node.
TransformTransformReadGets the transform.
GlobalTransformGlobalTransformReadGets the global transform.
SceneSceneReadGets the scene.
NamestringRead/WriteGets or sets the name.
PropertiesPropertyCollectionReadGets the properties.

Methods

SignatureDescription
Node()Creates a node with name and attaches the given entity
Node(name: string)
Node(name: string, entity: Entity)
CreateChildNode()Creates a child node
CreateChildNode(nodeName: string)Creates a child node
CreateChildNode(entity: Entity)Creates a child node
CreateChildNode(nodeName: string, entity: Entity)Creates a child node
CreateChildNode(nodeName: string, entity: Entity, material: Shading.Material)Creates a child node
AddChildNode(node: Node)Add a child node to this node
AddEntity(entity: Entity)Add an entity to the node.
Merge(node: Node)Detach everything under the node and attach them to current node.
EvaluateGlobalTransform(withGeometricTransform: bool)Evaluate the global transform, include the geometric transform or not.
GetChild(index: int)Gets the child node at specified index.
GetChild(nodeName: string)Gets the child node at specified index.
Accept(visitor: NodeVisitor)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
GetBoundingBox()Calculate the bounding box of the node
SelectSingleObject(path: string)Select single object under current node using XPath-like query syntax.
SelectObjects(path: string)Select multiple objects under current node using XPath-like query syntax.
ToString()Gets the string representation of this node.
SceneObject(name: string)
A3DObject()
RemoveProperty(property: Property)Removes a dynamic property.
GetProperty(property: string)Get the value of specified property
SetProperty(property: string, value: object?)Sets the value of specified property
FindProperty(propertyName: string)Finds the property. It can be a dynamic property (Created by CreateDynamicProperty/SetProperty) or native property(Identified by its name)

See Also