
simGetShapeColor
Retrieves the color of a shape
C++ synopsis
int simGetShapeColor(int shapeHandle, const char* colorName, int colorComponent, float* rgbData)
Arguments
- 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 nullptr. If colorName is @compound, then rgb data for every component of a compound shape will be returned (in that case make sure to have enough space in rgbData, e.g. via the meshes property)
- colorComponent: color component.
- rgbData (output): red, green and blue components of the color (3 values), or the transparency value (1 value)
Return
- -1 if operation was not successful. 0 if the color name was not found in the shape. Otherwise, the operation was successful
See also:
|