Class Node
A node in the imported model hierarchy.
Implements
Inherited Members
Namespace: SharpAssimp
Assembly: SharpAssimp.dll
Syntax
public sealed class Node : IMarshalable<Node, AiNode>
Constructors
| Edit this page View SourceNode()
Constructs a new instance of the Node class.
Declaration
public Node()
Node(string)
Constructs a new instance of the Node class.
Declaration
public Node(string name)
Parameters
Type | Name | Description |
---|---|---|
string | name | Name of the node |
Node(string, Node?)
Constructs a new instance of the Node class.
Declaration
public Node(string name, Node? parent)
Parameters
Type | Name | Description |
---|---|---|
string | name | Name of the node |
Node | parent | Parent of the node |
Properties
| Edit this page View SourceChildCount
Gets the number of children that is owned by this node.
Declaration
public int ChildCount { get; }
Property Value
Type | Description |
---|---|
int |
Children
Gets the node's children.
Declaration
public NodeCollection Children { get; }
Property Value
Type | Description |
---|---|
NodeCollection |
HasChildren
Gets if the node contains children.
Declaration
public bool HasChildren { get; }
Property Value
Type | Description |
---|---|
bool |
HasMeshes
Gets if the node contains mesh references.
Declaration
public bool HasMeshes { get; }
Property Value
Type | Description |
---|---|
bool |
MeshCount
Gets the number of meshes referenced by this node.
Declaration
public int MeshCount { get; }
Property Value
Type | Description |
---|---|
int |
MeshIndices
Gets the indices of the meshes referenced by this node. Meshes can be shared between nodes, so there is a mesh collection owned by the scene that each node can reference.
Declaration
public List<int> MeshIndices { get; }
Property Value
Type | Description |
---|---|
List<int> |
Metadata
Gets the node's metadata container.
Declaration
public Metadata Metadata { get; }
Property Value
Type | Description |
---|---|
Metadata |
Name
Gets or sets the name of the node.
Declaration
public string Name { get; set; }
Property Value
Type | Description |
---|---|
string |
Parent
Gets the node's parent, if it exists.
Declaration
public Node? Parent { get; }
Property Value
Type | Description |
---|---|
Node |
Transform
Gets or sets the transformation of the node relative to its parent.
Declaration
public Matrix4x4 Transform { get; set; }
Property Value
Type | Description |
---|---|
Matrix4x4 |
Methods
| Edit this page View SourceFindNode(string)
Finds a node with the specific name, which may be this node or any children or children's children, and so on, if it exists.
Declaration
public Node? FindNode(string name)
Parameters
Type | Name | Description |
---|---|---|
string | name | Node name |
Returns
Type | Description |
---|---|
Node | The node or null if it does not exist |
FreeNative(nint, bool)
Frees unmanaged memory created by ToNative(nint, out Native).
Declaration
public static void FreeNative(nint nativeValue, bool freeNative)
Parameters
Type | Name | Description |
---|---|---|
nint | nativeValue | Native value to free |
bool | freeNative | True if the unmanaged memory should be freed, false otherwise. |