Regular API function

simSetLightParameters / sim.setLightParameters

Description Sets various parameters of a light object. See also sim.getLightParameters.
C synopsis simInt simSetLightParameters(simInt objectHandle,simInt state,const simFloat* setToNULL,const simFloat* diffusePart,const simFloat* specularPart)
C parameters
objectHandle: handle of the light
state: bit-coded. for now, only bit 0 is used: 1=light on
setToNULL: not used, set to NULL
diffusePart: red, green and blue component of the light's diffuse part. Can be NULL
specularPart: red, green and blue component of the light's specular part. Can be NULL
C return value
-1 if operation was not successful. In a future release, a more differentiated return value might be available
Lua synopsis number result=sim.setLightParameters(number objectHandle,number state,nil,table_3 diffusePart,table_3 specularPart)
Lua parameters
Same as C-function
Lua return values
Same as C-function

All regular API functions on one page