Regular API function

simCreatePureShape / sim.createPureShape

Description Creates a pure primitive shape. See also sim.createMeshShape, sim.createHeightfieldShape and sim.addParticleObject.
C synopsis simInt simCreatePureShape(simInt primitiveType,simInt options,const simFloat* sizes,simFloat mass,const simInt* precision)
C parameters
primitiveType: 0 for a cuboid, 1 for a sphere, 2 for a cylinder and 3 for a cone
options: Bit-coded: if bit0 is set (1), backfaces are culled. If bit1 is set (2), edges are visible. If bit2 is set (4), the shape appears smooth. If bit3 is set (8), the shape is respondable. If bit4 is set (16), the shape is static. If bit5 is set (32), the cylinder has open ends
sizes: 3 values indicating the size of the shape
mass: the mass of the shape
precision: 2 values that allow specifying the number of sides and faces of a cylinder or sphere. Can be nullptr for default values
C return value
-1 if operation was not successful, otherwise the handle of the newly created shape
Lua synopsis int objectHandle=sim.createPureShape(int primitiveType,int options,table[3] sizes,float mass,table[2] precision=nil)
Lua parameters
Similar to the C-function counterpart
Lua return values
Similar to the C-function counterpart