Table of Contents

Class CGVSubMesh

SubMesh data (triangles, material)

public class CGVSubMesh : CGData
Inheritance
CGVSubMesh
Inherited Members

Constructors

CGVSubMesh(CGVSubMesh)

public CGVSubMesh(CGVSubMesh source)

Parameters

source CGVSubMesh

CGVSubMesh(int, Material)

public CGVSubMesh(int triangleCount, Material material = null)

Parameters

triangleCount int
material Material

CGVSubMesh(int[], Material)

public CGVSubMesh(int[] triangles, Material material = null)

Parameters

triangles int[]
material Material

CGVSubMesh(SubArray<int>, Material)

public CGVSubMesh(SubArray<int> triangles, Material material = null)

Parameters

triangles SubArray<int>
material Material

CGVSubMesh(Material)

public CGVSubMesh(Material material = null)

Parameters

material Material

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

int

TrianglesList

Vertex indices constituting the mesh's triangles

public SubArray<int> TrianglesList { get; set; }

Property Value

SubArray<int>

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

other CGVSubMesh
shiftIndexOffset int

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

disposing bool

Returns

bool

Get(CGVSubMesh, int, Material)

public static CGVSubMesh Get(CGVSubMesh data, int triangleCount, Material material = null)

Parameters

data CGVSubMesh
triangleCount int
material Material

Returns

CGVSubMesh

ShiftIndices(int, int)

Shifts all triangle indices by the given offset, starting from startIndex

public void ShiftIndices(int offset, int startIndex = 0)

Parameters

offset int
startIndex int