Class TriMeshT

TriMesh<T> class

Generic version of TriMesh for user’s static-defined vertex type

public class TriMesh<T> : TriMesh
    where T : struct
ParameterDescription
T

Constructors

NameDescription
TriMesh(string)Initialize an instance of TriMesh

Properties

NameDescription
Capacity { get; }The capacity of pre-allocated vertices.(Inherited from TriMesh.)
Excluded { get; set; }Gets or sets whether to exclude this entity during exporting.(Inherited from Entity.)
IndicesCount { get; }The count of indices in this TriMesh(Inherited from TriMesh.)
virtual Name { get; set; }Gets or sets the name.(Inherited from A3DObject.)
ParentNode { get; set; }Gets or sets the first parent node, if set the first parent node, this entity will be detached from other parent nodes.(Inherited from Entity.)
ParentNodes { get; }Gets all parent nodes, an entity can be attached to multiple parent nodes for geometry instancing(Inherited from Entity.)
Properties { get; }Gets the collection of all properties.(Inherited from A3DObject.)
Scene { get; }Gets the scene that this object belongs to(Inherited from SceneObject.)
UnmergedVerticesCount { get; }The count of unmerged vertices that passed in by BeginVertex and EndVertex.(Inherited from TriMesh.)
VertexDeclaration { get; }The vertex layout of the TriMesh.(Inherited from TriMesh.)
VerticesCount { get; }The count of vertices in this TriMesh(Inherited from TriMesh.)
VerticesSizeInBytes { get; }The total size of all vertices in bytes(Inherited from TriMesh.)

Methods

NameDescription
static FromMesh(Mesh)Create a TriMesh from given mesh object with automatically generated vertex layout.
AddTriangle(int, int, int)Add a new triangle(Inherited from TriMesh.)
BeginVertex()Begin adding vertex(Inherited from TriMesh.)
EndVertex()End adding vertex(Inherited from TriMesh.)
FindProperty(string)Finds the property. It can be a dynamic property (Created by CreateDynamicProperty/SetProperty) or native property(Identified by its name)(Inherited from A3DObject.)
GetBoundingBox()Gets the bounding box of current entity in its object space coordinate system.(Inherited from Entity.)
virtual GetEntityRendererKey()Gets the key of the entity renderer registered in the renderer(Inherited from Entity.)
GetEnumerator()Get the enumerator to enumerate Vertex(Inherited from TriMesh.)
GetProperty(string)Get the value of specified property(Inherited from A3DObject.)
IndicesToArray(out int[])(Inherited from TriMesh.)
IndicesToArray(out ushort[])(Inherited from TriMesh.)
LoadVerticesFromBytes(byte[])Load vertices from bytes, the length of bytes must be an integer multiple of vertex size.(Inherited from TriMesh.)
ReadDouble(int, VertexField)Read the double field(Inherited from TriMesh.)
ReadFloat(int, VertexField)Read the float field(Inherited from TriMesh.)
ReadFVector2(int, VertexField)Read the vector2 field(Inherited from TriMesh.)
ReadFVector3(int, VertexField)Read the vector3 field(Inherited from TriMesh.)
ReadFVector4(int, VertexField)Read the vector4 field(Inherited from TriMesh.)
ReadVector2(int, VertexField)Read the vector2 field(Inherited from TriMesh.)
ReadVector3(int, VertexField)Read the vector3 field(Inherited from TriMesh.)
ReadVector4(int, VertexField)Read the vector4 field(Inherited from TriMesh.)
RemoveProperty(Property)Removes a dynamic property.(Inherited from A3DObject.)
RemoveProperty(string)Remove the specified property identified by name(Inherited from A3DObject.)
SetProperty(string, object)Sets the value of specified property(Inherited from A3DObject.)
override ToString()Gets the string representation of TriMesh(Inherited from TriMesh.)
VerticesToArray()Convert the vertices data to byte array(Inherited from TriMesh.)
VerticesToTypedArray()Convert the vertices data to typed array
Write16bIndicesTo(Stream)Write the indices data as 16bit integer to the stream(Inherited from TriMesh.)
Write32bIndicesTo(Stream)Write the indices data as 32bit integer to the stream(Inherited from TriMesh.)
WriteVerticesTo(Stream)Write vertices data to the specified stream(Inherited from TriMesh.)

See Also