
simGetShapeColor / sim.getShapeColor
Description
|
Retrieves the color of a shapes. See also sim.setShapeColor. |
C synopsis
|
simInt simGetShapeColor(simInt shapeHandle,const simChar* colorName,simInt colorComponent,simFloat* rgbData)
|
C parameters |
shapeHandle: handle of the shape
colorName: name of a color. If a name is provided, a specific color component will be retrieved (e.g. if a shape is a compound shape. Can be NULL.
rgbData (output): red, green and blue components of the color (3 values), or the transparency value (1 value)
|
C return value
|
-1 if operation was not successful. 0 if the color name was not found in the shape. Otherwise, the operation was successful
|
Lua synopsis
|
number result,table_3 rgbData=sim.getShapeColor(number shapeHandle,string colorName,number colorComponent)
|
Lua parameters |
Same as C-function
|
Lua return values
|
Same as C-function
|
All regular API functions on one page
|