Description
|
Retrieves a shape's mesh information. See also simCreateMeshShape and simExportMesh for a usage example.
|
C synopsis
|
simInt simGetShapeMesh(simInt shapeHandle,simFloat** vertices,simInt* verticesSize,simInt** indices,simInt* indicesSize,simFloat** normals)
|
C parameters |
shapeHandle: handle of the shape
verticesSize: receives the size of the vertices array. See simExportMesh for a usage example.
indicesSize: receives the size of the indice array. See simExportMesh for a usage example.
normals: receives the normals (3 times the size of indicesSize). The user is in charge of destroying the array with simReleaseBuffer. Can be NULL.
|
C return value
|
-1 if operation was not successful. In a future release, a more differentiated return value might be available
|
Lua synopsis
|
table vertices,table indices,table normals=simGetShapeMesh(number shapeHandle)
|
Lua parameters |
shapeHandle: handle of the shape. See simExportMesh for a usage example.
|
Lua return values
|
vertices: table of vertices, or nil in case of an error
indices: table of indices, or nil in case of an error
normals: table of normals, or nil in case of an error
|