C# Class MeshCombineUtility, OZML

ファイルを表示 Open project: merveilles/OZML Class Usage Examples

Public Methods

Method Description
AddMeshInstance ( MeshInstance instance ) : void

Add a mesh instance to the combiner.

AddMeshInstances ( IEnumerable instances ) : void

Add multiple mesh instances to the combiner, allocating space for them all up-front.

Combine ( IEnumerable instances, bool generateStrips ) : Mesh

Combine the given mesh instances into a single mesh and return it.

CreateCombinedMesh ( ) : Mesh

Generate a single mesh from the instances that have been added to the combiner so far.

MeshCombineUtility ( bool generateStrips ) : System.Collections.Generic

Creates a new, empty MeshCombineUtility object for combining meshes.

PrepareForAddingStrips ( int targetSubmeshIndex, IEnumerable stripLengths ) : void

Allocate space for adding a load more triangle strips to the combiner.

PrepareForAddingTriangles ( int targetSubmeshIndex, int numIndices ) : void

Allocate space for adding a load more triangles to the triangle list.

PrepareForAddingVertices ( int numVertices ) : void

Allocate space for adding a load more vertex data.

Method Details

AddMeshInstance() public method

Add a mesh instance to the combiner.
public AddMeshInstance ( MeshInstance instance ) : void
instance MeshInstance The mesh instance to add.
return void

AddMeshInstances() public method

Add multiple mesh instances to the combiner, allocating space for them all up-front.
public AddMeshInstances ( IEnumerable instances ) : void
instances IEnumerable The instances to add.
return void

Combine() public static method

Combine the given mesh instances into a single mesh and return it.
public static Combine ( IEnumerable instances, bool generateStrips ) : Mesh
instances IEnumerable The mesh instances to combine.
generateStrips bool true to use triangle strips, false to use triangle lists.
return Mesh

CreateCombinedMesh() public method

Generate a single mesh from the instances that have been added to the combiner so far.
public CreateCombinedMesh ( ) : Mesh
return Mesh

MeshCombineUtility() public method

Creates a new, empty MeshCombineUtility object for combining meshes.
public MeshCombineUtility ( bool generateStrips ) : System.Collections.Generic
generateStrips bool true if the meshes you're going to combine are all triangle-strip based; false if you just want to use triangle lists.
return System.Collections.Generic

PrepareForAddingStrips() public method

Allocate space for adding a load more triangle strips to the combiner.
public PrepareForAddingStrips ( int targetSubmeshIndex, IEnumerable stripLengths ) : void
targetSubmeshIndex int The index of the submesh you're going to add strips to.
stripLengths IEnumerable A sequence of strip lengths (in number-of-indices). These numbers will be used to automatically calculate how many bridging indices need to be added.
return void

PrepareForAddingTriangles() public method

Allocate space for adding a load more triangles to the triangle list.
public PrepareForAddingTriangles ( int targetSubmeshIndex, int numIndices ) : void
targetSubmeshIndex int The index of the submesh that you're going to add triangles to.
numIndices int The number of triangle indicies (number of triangles * 3) that you want to reserve space for.
return void

PrepareForAddingVertices() public method

Allocate space for adding a load more vertex data.
public PrepareForAddingVertices ( int numVertices ) : void
numVertices int The number of vertices you're about to add.
return void