Regular API function

simSetShapeTexture

Description Applies (or removes) a texture to a shape. See also simGetTextureId, simGetShapeTextureId and simCreateTexture.
C synopsis simInt simSetShapeTexture(simInt shapeHandle,simInt textureId,simInt mappingMode,simInt options,const simFloat* uvScaling,const simFloat* position,const simFloat* orientation
C parameters
shapeHandle: the handle of the shape.
textureId: the ID of the texture or -1 to remove any existing texture. See also simGetTextureId, simGetShapeTextureId and simCreateTexture.
mappingMode: the texture mapping mode.
options: bit-coded:
bit0: if set (1), then adjacent texture pixels are not interpolated.
bit1: if set (2), then the texture is applied as a decal (its appearance won't be influenced by light conditions).
bit2: if set (4), then the texture will be repeated along the U direction.
bit3: if set (8), then the texture will be repeated along the V direction.
uvScaling: a pointer to 2 values that indicate the texture scaling factors along the U and V directions.
position: a pointer to 3 values (x,y,z) that indicate the texture position on the shape. Can be NULL for default values.
orientation: a pointer to 3 values (Euler angles) that indicate the texture orientation on the shape. Can be NULL for default values.
C return value
-1 in case of an error.
Lua synopsis number result=simSetShapeTexture(number shapeHandle,number textureId,number mappingMode,number options,table_2 uvScaling,table_3 position=nil,table_3 orientation=nil)
Lua parameters
Similar as C-function
Lua return values
Similar as C-function

All regular API functions on one page