Edit Light

pxGetLightNames

Gets the list of light names available including the main headlight.

List<String> pxGetLightNames()

return

Returns list of light names.

pxGetLightDiffuseColor

Gets RGB diffuse color of the given light.

List<float> pxGetLightDiffuseColor(String lightName)

return

Returns a value array of size 3.

Array[0] - red color value (0,1)
Array[1] - green color value (0,1)
Array[2] - blue color value (0,1)

xSetLightDiffuseColor

Sets RGB diffuse color of the given light.

void xSetLightDiffuseColor(String lightName, float r,float g, float b)

return

None

r

value of red color in the range (0,1)

g

value of green color in the range (0,1)

b

value of blue color in the range (0,1)

pxGetLightSpecularColor

Gets RGB specular color of the given light.

List<float> pxGetLightSpecularColor(String lightName)

return

Returns a value array of size 3.

Array[0] - red color value (0,1)
Array[1] - green color value (0,1)
Array[2] - blue color value (0,1)

xSetLightSpecularColor

Sets RGB diffuse color of the given light.

void xSetLightDiffuseColor(String lightName, float r, float g, float b)

return

None.

r

value of red color in the range (0,1)

g

value of green color in the range (0,1)

b

value of blue color in the range (0,1)

pxGetLightDirection

Gets direction unit vector of the given light.

List<float> pxGetLightDirection (String lightName)

return

Returns a value array of size 3.

Array[0] - red color value (0,1)
Array[1] - green color value (0,1)
Array[2] - blue color value (0,1)

xSetLightDirection

Sets direction vector to the given light and attach to the camera if needed.

void xSetLightDirection (String lightName, float x,float y, float z, bool bAttach2Camera)

return

None.

x

X-axis coordinate.

y

Y-axis coordinate.

z

Z-axis coordinate.

bAttach2Camera

Attaches given light to the camera based on this flag.

xGetLightVisibility

Gets given light switched ON/OFF.

bool xGetLightVisibility(String lightName)

return

Returns True, if the light is ON.

Returns False, if the light is OFF.

lightName

Name of the light.

xSetLightVisibility

Sets given light switched ON/OFF flag.

void xSetLightVisibility(String lightName, bool bShow)

lightName

Name of the light.

bShow

Visibility flag.

xSetHeadLightMode

Sets Head Light ON/OFF.

void xSetHeadLightMode(bool bShow)

bShow

Visibility flag.