Node

Enumerations

Enumerations Node klassen representerer et navngitt element i Aspose.3D-scengrafen. Hver node kan holde én Entity (som en Mesh, Camera, eller Light).

using Aspose.ThreeD;

var scene = new Scene();

// Access the root node
Node root = scene.RootNode;

// Create a child node
Node child = root.CreateChildNode("my_node");

// Iterate child nodes
foreach (var node in root.ChildNodes)
{
    Console.WriteLine(node.Name);
}

Enumerations

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.

Enumerations

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)

Enumerations

using Aspose.ThreeD;
using Aspose.ThreeD.Entities;

var scene = new Scene();

// Build a hierarchy with entities
var parent = scene.RootNode.CreateChildNode("Parent");
parent.Transform.Translation = new FVector3(10, 0, 0);

var box = new Box(2, 2, 2);
var child = parent.CreateChildNode("BoxChild", box);
child.Transform.Translation = new FVector3(5, 0, 0);

scene.Save("hierarchy.gltf");

Se også

 Norsk