Class CGVSubMesh
- Namespace
- FluffyUnderware.Curvy.Generator
SubMesh data (triangles, material)
public class CGVSubMesh : CGData
- Inheritance
-
CGVSubMesh
- Inherited Members
Constructors
CGVSubMesh(CGVSubMesh)
public CGVSubMesh(CGVSubMesh source)
Parameters
sourceCGVSubMesh
CGVSubMesh(int, Material)
public CGVSubMesh(int triangleCount, Material material = null)
Parameters
triangleCountintmaterialMaterial
CGVSubMesh(int[], Material)
public CGVSubMesh(int[] triangles, Material material = null)
Parameters
trianglesint[]materialMaterial
CGVSubMesh(SubArray<int>, Material)
public CGVSubMesh(SubArray<int> triangles, Material material = null)
Parameters
CGVSubMesh(Material)
public CGVSubMesh(Material material = null)
Parameters
materialMaterial
Fields
Material
The material used by this submesh
public Material Material
Field Value
- Material
Properties
Count
Gets the number of elements in the data
public override int Count { get; }
Property Value
TrianglesList
Vertex indices constituting the mesh's triangles
public SubArray<int> TrianglesList { get; set; }
Property Value
Remarks
Setting a new SubArray<T> will Free(SubArray<T>) the current SubArray<T> instance
Methods
Add(CGVSubMesh, int)
Appends another submesh's triangles to this one, optionally shifting indices using ShiftIndices(int, int) if the shiftIndexOffset is not zero
public void Add(CGVSubMesh other, int shiftIndexOffset = 0)
Parameters
otherCGVSubMeshshiftIndexOffsetint
Clone<T>()
Creates a copy of this data instance
public override T Clone<T>() where T : CGData
Returns
- T
Type Parameters
T
Dispose(bool)
protected override bool Dispose(bool disposing)
Parameters
disposingbool
Returns
Get(CGVSubMesh, int, Material)
public static CGVSubMesh Get(CGVSubMesh data, int triangleCount, Material material = null)
Parameters
dataCGVSubMeshtriangleCountintmaterialMaterial
Returns
ShiftIndices(int, int)
Shifts all triangle indices by the given offset, starting from startIndex
public void ShiftIndices(int offset, int startIndex = 0)