TriMesh
Overview
TriMesh is a class in Aspose.3D FOSS for .NET.
Inherits from: Entity, INamedObject, IEnumerable<Vertex>.
A TriMesh contains raw data that can be used by GPU directly.
This class provides 37 methods for working with TriMesh objects in .NET programs.
Available methods include: A3DObject, AddTriangle, BeginVertex, CopyFrom, EndVertex, Entity, FindProperty, FromMesh, FromRawData, GetBoundingBox, GetEntityRendererKey, GetEnumerator, and 21 additional methods.
All public members are accessible to any .NET application after installing the Aspose.3D FOSS for .NET package.
Properties: Capacity, Excluded, IndicesCount, Name, ParentNode, ParentNodes, and 6 more.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
VertexDeclaration | VertexDeclaration | Read | Gets the vertex declaration. |
VerticesCount | int | Read | Gets the vertices count. |
IndicesCount | int | Read | Gets the indices count. |
UnmergedVerticesCount | int | Read | Gets the unmerged vertices count. |
Capacity | int | Read | Gets the capacity. |
VerticesSizeInBytes | int | Read | Gets the vertices size in bytes. |
Excluded | bool | Read/Write | Gets or sets whether to exclude this entity during exporting. |
ParentNodes | List<Node> | Read | Gets all parent nodes, an entity can be attached to multiple parent nodes for geometry instancing |
ParentNode | Node | Read/Write | Gets or sets the first parent node, if set the first parent node, this entity will be detached from other parent nodes. |
Scene | Scene | Read | Gets the scene that this object belongs to |
Name | string | Read/Write | Gets or sets the name. |
Properties | PropertyCollection | Read | Gets the collection of all properties. |
Methods
| Signature | Description |
|---|---|
TriMesh(name: string, declaration: VertexDeclaration) | Calls TriMesh(name, declaration) on this TriMesh instance. |
FromMesh(declaration: VertexDeclaration, mesh: Mesh) | Calls FromMesh(declaration, mesh) on this TriMesh instance. |
CopyFrom(input: TriMesh, vd: VertexDeclaration) | Calls CopyFrom(input, vd) on this TriMesh instance. |
FromMesh(mesh: Mesh, useFloat: bool) | Calls FromMesh(mesh, useFloat) on this TriMesh instance. |
BeginVertex() | Calls BeginVertex on this TriMesh instance. |
EndVertex() | Calls EndVertex on this TriMesh instance. |
WriteVerticesTo(stream: Stream) | Calls WriteVerticesTo(stream) on this TriMesh instance. |
Write16bIndicesTo(stream: Stream) | Calls Write16bIndicesTo(stream) on this TriMesh instance. |
Write32bIndicesTo(stream: Stream) | Calls Write32bIndicesTo(stream) on this TriMesh instance. |
VerticesToArray() | Calls VerticesToArray on this TriMesh instance. |
IndicesToArray(result: ushort[]) | Calls IndicesToArray(result) on this TriMesh instance. |
IndicesToArray(result: int[]) | Calls IndicesToArray(result) on this TriMesh instance. |
ToString() | Calls ToString on this TriMesh instance. |
FromRawData(vd: VertexDeclaration, vertices: byte[], indices: int[], generateVertexMapping: bool) | Calls FromRawData(vd, vertices, indices, generateVertexMapping) on this TriMesh instance. |
LoadVerticesFromBytes(verticesInBytes: byte[]) | Calls LoadVerticesFromBytes(verticesInBytes) on this TriMesh instance. |
AddTriangle(a: int, b: int, c: int) | Calls AddTriangle(a, b, c) on this TriMesh instance. |
GetEnumerator() | Calls GetEnumerator on this TriMesh instance. |
ReadVector4(idx: int, field: VertexField) | Calls ReadVector4(idx, field) on this TriMesh instance. |
ReadFVector4(idx: int, field: VertexField) | Calls ReadFVector4(idx, field) on this TriMesh instance. |
ReadVector3(idx: int, field: VertexField) | Calls ReadVector3(idx, field) on this TriMesh instance. |
ReadFVector3(idx: int, field: VertexField) | Calls ReadFVector3(idx, field) on this TriMesh instance. |
ReadVector2(idx: int, field: VertexField) | Calls ReadVector2(idx, field) on this TriMesh instance. |
ReadFVector2(idx: int, field: VertexField) | Calls ReadFVector2(idx, field) on this TriMesh instance. |
ReadDouble(idx: int, field: VertexField) | Calls ReadDouble(idx, field) on this TriMesh instance. |
ReadFloat(idx: int, field: VertexField) | Calls ReadFloat(idx, field) on this TriMesh instance. |
TriMesh(name: string) | Initialize an instance of |
FromMesh(mesh: Mesh) | Create a TriMesh from given mesh object with automatically generated vertex layout. |
VerticesToTypedArray() | Convert the vertices data to typed array |
Entity(name: string) | Initializes a new instance of the Entity class. |
GetBoundingBox() | Gets the bounding box of current entity in its object space coordinate system. |
GetEntityRendererKey() | Gets the key of the entity renderer registered in the renderer |
SceneObject(name: string) | Initialize an SceneObject with a default name |
A3DObject() | Initializes a new instance of the A3DObject class with no name. |
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. |