Regular API function

simCreateHeightfieldShape / sim.createHeightfieldShape

Description Creates a heightfield shape. See also sim.createPrimitiveShape, sim.createMeshShape and sim.addParticleObject.
C/C++
synopsis
simInt simCreateHeightfieldShape(simInt options,simFloat shadingAngle,simInt xPointCount,simInt yPointCount,simFloat xSize,const simFloat* heights)
C/C++
parameters
options: bit-coded options:
bit 0 set (1): back faces are culled
bit 1 set (2): overlay mesh is visible
bit 2 set (4): a simple shape is generated instead of a heightfield
bit 3 set (8): the heightfield is not respondable
shadingAngle: the shading angle
xPointCount/yPointCount: the number of rows and lines of the heightfield.
xSize: the length of the x side of the heightfield
heights: a pointer to xPointCount*yPointCount height values.
C/C++
return value
-1 if operation was not successful, otherwise the handle of the newly created shape
Lua
synopsis
int objectHandle=sim.createHeightfieldShape(int options,float shadingAngle,int xPointCount,int yPointCount,float xSize,float[] heights)
Lua
parameters
Similar to the C-function counterpart
Lua
return values
Similar to the C-function counterpart
Python
synopsis
int objectHandle=sim.createHeightfieldShape(int options,float shadingAngle,int xPointCount,int yPointCount,float xSize,list heights)