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 is a utility to help to construct a mesh that only contains per-vertex data.
This class provides 32 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 20 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 the excluded. |
ParentNodes | List<Node> | Read | Gets the parent nodes. |
ParentNode | Node | Read/Write | Gets or sets the parent node. |
Scene | Scene | Read | Gets the scene. |
Name | string | Read/Write | Gets or sets the name. |
Properties | PropertyCollection | Read | Gets the properties. |
Methods
| Signature | Description |
|---|---|
TriMesh(name: string, declaration: VertexDeclaration) | |
FromMesh(declaration: VertexDeclaration, mesh: Mesh) | |
CopyFrom(input: TriMesh, vd: VertexDeclaration) | |
FromMesh(mesh: Mesh, useFloat: bool) | |
BeginVertex() | |
EndVertex() | |
WriteVerticesTo(stream: Stream) | |
Write16bIndicesTo(stream: Stream) | |
Write32bIndicesTo(stream: Stream) | |
VerticesToArray() | |
IndicesToArray(result: ushort[]) | |
IndicesToArray(result: int[]) | |
ToString() | |
FromRawData(vd: VertexDeclaration, vertices: byte[], indices: int[], generateVertexMapping: bool) | |
LoadVerticesFromBytes(verticesInBytes: byte[]) | |
AddTriangle(a: int, b: int, c: int) | |
GetEnumerator() | |
ReadVector4(idx: int, field: VertexField) | |
ReadFVector4(idx: int, field: VertexField) | |
ReadVector3(idx: int, field: VertexField) | |
ReadFVector3(idx: int, field: VertexField) | |
ReadVector2(idx: int, field: VertexField) | |
ReadFVector2(idx: int, field: VertexField) | |
ReadDouble(idx: int, field: VertexField) | |
ReadFloat(idx: int, field: VertexField) | |
Entity(name: string) | |
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) | |
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) |