Regular API function

simGetDecimatedMesh

Description Retrieves a decimated mesh (i.e. a simplified mesh). See also simConvexDecompose and simGetQHull.
C synopsis simInt simGetDecimatedMesh(const simFloat* inVertices,simInt inVerticesL,const simInt* inIndices,simInt inIndicesL,simFloat** verticesOut,simInt* verticesOutL,simInt** indicesOut,simInt* indicesOutL,simFloat decimationPercent,simInt reserved1,const simFloat* reserved2)
C parameters
inVertices: a pointer to the input vertices (succession of x/y/z values).
inVerticesL: the number of input vertices times 3.
inIndices: a pointer to the input indices (3 values for each triangle).
inIndicesL: the number of input triangles times 3.
verticesOut: a pointer to a pointer to the output vertices. The output vertices are allocated by V-REP and the user is in charge of releasing the buffer via simReleaseBuffer.
verticesOutL: a pointer to the number of output vertices times 3.
indicesOut: a pointer to a pointer to the output indices. The output indices are allocated by V-REP and the user is in charge of releasing the buffer via simReleaseBuffer.
indicesOutL: a pointer to the number of output indices (i.e. the number of triangles times 3).
decimationPercent: the percentage of the desired decimation (0.1-0.9).
reserved1: reserved, set to 0.
reserved2: reserved, set to NULL.
C return value
-1 or 0 if operation was not successful.
Lua synopsis table verticesOut,table indicesOut=simGetDecimatedMesh(table verticesIn,table indicesIn,number decimationPercentage)
Lua parameters
verticesIn: a table containing the input vertices (succession of x/y/z values).
indicesIn: a table containing the input indices (3 values for each triangle).
decimationPercentage: the percentage of the desired decimation (0.1-0.9).
Lua return values
verticesOut: a table containing the output vertices (succession of x/y/z values).
indicesOut: a table containing the output indices (3 values for each triangle).

All regular API functions on one page