Regular API function

simCreateMeshShape

Description Creates a mesh shape. See also simCreatePureShape, simCreateHeightfieldShape and simGetShapeMesh, and see simImportMesh for a usage example.
C synopsis simInt simCreateMeshShape(simInt options,simFloat shadingAngle,const simFloat* vertices,simInt verticesSize,const simInt* indices,simInt indicesSize,simFloat* reserved)
C parameters
options: Bit-coded: if bit0 is set (1), backfaces are culled. If bit1 is set (2), edges are visible
shadingAngle: the shading angle
vertices: an array of vertices
verticesSize: the size of the vertice array
indices: an array of indices
indicesSize: the size of the indice array
reserved: reserved for future extensions. Keep at NULL.
C return value
-1 if operation was not successful, otherwise the handle of the newly created shape
Lua synopsis number objectHandle=simCreateMeshShape(number options,number shadingAngle,table vertices,table indices)
Lua parameters
options: Bit-coded: if bit0 is set (1), backfaces are culled. If bit1 is set (2), edges are visible
shadingAngle: the shading angle
vertices: a table of vertices
indices: a table of indices
Lua return values
Same as C-function

All regular API functions on one page