Public Member Functions | |
| void | SetColor (float pR, float pG, float pB, float pA) |
| void | SetPosition (float pX, float pY, float pZ) |
| void | SetDirection (float pD1, float pD2, float pD3) |
| void | SetAttenuation (float pAttenuation) |
| void | SetRange (float pRange) |
| void | SetTheta (float pTheta) |
| void | SetPhi (float pPhi) |
| void | SetFalloff (float pFalloff) |
| bool | IsEnable () |
| Returns true if the light is enable, false otherwise. | |
| float | GetColorR () |
| Returns red color component of the light. | |
| float | GetColorG () |
| Returns green color component of the light. | |
| float | GetColorB () |
| Returns blue color component of the light. | |
| float | GetColorA () |
| Returns alpha component of the light. | |
| float | GetPosX () |
| Returns x position of the light. | |
| float | GetPosY () |
| Returns y position of the light. | |
| float | GetPosZ () |
| Returns z position of the light. | |
| float | GetDirP1 () |
| Returns the first component of the vector which defines the light direction. | |
| float | GetDirP2 () |
| Returns the second component of the vector which defines the light direction. | |
| float | GetDirP3 () |
| Returns the third component of the vector which defines the light direction. | |
| float | GetAttenuation () |
| Returns the attenuation factor of the light. | |
| float | GetRange () |
| Returns the range factor of the light. | |
| float | GetTheta () |
| Returns the range theta of the light. | |
| float | GetPhi () |
| Returns the phi factor of the light. | |
| float | GetFalloff () |
| Returns the falloff factor of the light. | |
Friends | |
| class | IND_LightManager |
| void IND_Light::SetColor | ( | float | pR, | |
| float | pG, | |||
| float | pB, | |||
| float | pA | |||
| ) |
Parameters:
Sets the light color. The color is specified using three floats (red, green and blue values). Usually you will use the range between 0.0f and 1.0f. The higer the value the nearest to the color. For example, red color will be: (1.0f, 0.0f, 0.0f).
Using values higher that 1.0f will increase the light intensity.
By Default: (1.0f, 1.0f, 1.0f)
| void IND_Light::SetPosition | ( | float | pX, | |
| float | pY, | |||
| float | pZ | |||
| ) |
Parameters:
Sets the light position.
By default: (0, 0, 0)
| void IND_Light::SetDirection | ( | float | pD1, | |
| float | pD2, | |||
| float | pD3 | |||
| ) |
Parameters:
Sets the light direction. This value is used for IND_DIRECTIONAL_LIGHT and IND_SPOT_LIGHT lights.
For example, for a Sun light, you can choose a direction: (0.0f, -0.3f, 0.5) with a IND_DIRECTIONAL_LIGHT.
By default: (0, 0, 0)
| void IND_Light::SetAttenuation | ( | float | pAttenuation | ) |
Parameters:
Sets the light attenuation. This value is used for IND_POINT_LIGHT and IND_SPOT_LIGHT lights.
By default: (0)
| void IND_Light::SetRange | ( | float | pRange | ) |
Parameters:
Sets the light range. This value is used for IND_DIRECTIONAL_LIGHT, IND_POINT_LIGHT and IND_SPOT_LIGHT lights.
By default: (0)
| void IND_Light::SetTheta | ( | float | pTheta | ) |
Parameters:
Sets the light theta factor. This value is used for IND_SPOT_LIGHT lights.
By default: (0)
| void IND_Light::SetPhi | ( | float | pPhi | ) |
Parameters:
Sets the light phi factor. This value is used for IND_SPOT_LIGHT lights.
By default: (0)
| void IND_Light::SetFalloff | ( | float | pFalloff | ) |
Parameters:
Sets the light falloff factor. This value is used for IND_SPOT_LIGHT lights.
By default: (0)
1.5.4