目录

SlimMesh

Method

unsigned int SlimMesh(unsigned int* targetIndices, const unsigned int* oriIndices, const float* oriVertices, MeshInfo meshInfo, float targetError)

针对模型Mesh相关的数据信息,依据其拓扑结构,进行三角面片的简化处理。

Parameters

Name

Description

targetIndices

指向简模后的顶点索引数据的指针。

oriIndices

指向模型顶点索引数据的指针。

oriVertices

指向模型顶点数据的指针。

meshInfo

模型Mesh结构信息。

targetError

简模容错率。

Returns

Type

Description

unsigned int

返回简模后的顶点索引的长度。如果输入oriIndices中值的个数少于3个或oriIndices中的某一个值大于等于实际meshInfo中indexCnt,将返回 0 。