C# Класс MeshCombineUtility, OZML

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Описание методов

AddMeshInstance() публичный Метод

Add a mesh instance to the combiner.
public AddMeshInstance ( MeshInstance instance ) : void
instance MeshInstance The mesh instance to add.
Результат void

AddMeshInstances() публичный Метод

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.
Результат void

Combine() публичный статический Метод

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.
Результат Mesh

CreateCombinedMesh() публичный Метод

Generate a single mesh from the instances that have been added to the combiner so far.
public CreateCombinedMesh ( ) : Mesh
Результат Mesh

MeshCombineUtility() публичный Метод

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.
Результат System.Collections.Generic

PrepareForAddingStrips() публичный Метод

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.
Результат void

PrepareForAddingTriangles() публичный Метод

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.
Результат void

PrepareForAddingVertices() публичный Метод

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.
Результат void