Description
|
Retrieves a shape's mesh information. See also sim.getShapeViz, sim.createMeshShape and sim.exportMesh for a usage example.
|
C/C++ synopsis
|
simInt simGetShapeMesh(simInt shapeHandle,simFloat** vertices,simInt* verticesSize,simInt** indices,simInt* indicesSize,simFloat** normals)
|
C/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 nullptr.
|
C/C++ return value
|
-1 if operation was not successful
|
Lua synopsis
|
float[] vertices,int[] indices,float[] normals=sim.getShapeMesh(int shapeHandle)
|
Lua parameters |
shapeHandle: handle of the shape. See sim.exportMesh for a usage example.
|
Lua return values
|
vertices: table of vertices
indices: table of indices
normals: table of normals
|
Python synopsis |
list vertices,list indices,list normals=sim.getShapeMesh(int shapeHandle) |