![]() |
Xors3d Engine
|
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. |
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.
typeID | Type 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.
light | Light source handle |
range | Range of light |
BBDECL void BBCALL xLightColor | ( | Light * | light, |
int | red, | ||
int | green, | ||
int | blue | ||
) |
Sets the color of a light.
light | Light source handle |
red | Red alue of light color |
green | Green alue of light color |
blue | Blue 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.
light | Light source handle |
inner | Inner angle of cone |
outer | Outer angle of cone |