Xors3d Engine
Lights

Functions

BBDECL Light *BBCALL xCreateLight (int typeID=1)
 Creates a light.
BBDECL void BBCALL xLightColor (Light *light, int red, int green, int blue)
 Sets the color of a light.
BBDECL void BBCALL xLightConeAngles (Light *light, float inner, float outer)
 Sets the cone angle for a spot light.
BBDECL void BBCALL xLightRange (Light *light, float range)
 Sets the range of a light.

Function Documentation

BBDECL Light* BBCALL xCreateLight ( int  typeID = 1)

Creates a light.

Lights work by affecting the colour of all vertices within the light's range. You should create at least one light if you wish to use 3D graphics otherwise everything will appear flat.

Parameters:
typeIDType of light. See 'Light types' for more information
BBDECL void BBCALL xLightRange ( Light *  light,
float  range 
)

Sets the range of a light.

The range of a light is how far it reaches. Everything outside the range of the light will not be affected by it. The value is very approximate, and should be experimented with for best results. Affect only for spot and point light sources.

Parameters:
lightLight source handle
rangeRange of light
BBDECL void BBCALL xLightColor ( Light *  light,
int  red,
int  green,
int  blue 
)

Sets the color of a light.

Parameters:
lightLight source handle
redRed alue of light color
greenGreen alue of light color
blueBlue alue of light color
BBDECL void BBCALL xLightConeAngles ( Light *  light,
float  inner,
float  outer 
)

Sets the cone angle for a spot light.

The default light cone angles setting is 0, 90. Affect only for spot light sources.

Parameters:
lightLight source handle
innerInner angle of cone
outerOuter angle of cone