IND_LightType
[Types]


Defines

#define IND_AMBIENT_LIGHT   100
#define IND_DIRECTIONAL_LIGHT   101
#define IND_POINT_LIGHT   102
#define IND_SPOT_LIGHT   103

Typedefs

typedef int IND_LightType
 Light types.

Define Documentation

#define IND_AMBIENT_LIGHT   100

Ambient light represents the background light in a scene. In the real world light bounces off many objects and creates a low light level so even geometry facing away from any directional light is still partially lit. Ambient light is very inexpensive in terms of frame rate - almost free. It is applied to all surfaces irrespective of the direction they are facing. There can be only one ambient light enabled at a time.

#define IND_DIRECTIONAL_LIGHT   101

Directional light is used to simulate distant light sources like the sun. It has a direction but no position. e.g. you could set it to point downward (0,-1,0) which would simulate the sun being directly overhead. Directional light is relatively inexpensive although if you add lots of them you may find your frame rate dropping somewhat. The lighting effect on objects depends on which way they are facing relative to the light direction (defined in the vertex normal). So a triangle with normal pointing straight up (0,1,0) would be lit by our sun (0,-1,0) fully - it would receive the maximum amount of light. As the angle of the normal to light increases less light is applied. If the triangle normal faces away from the light it is not lit at all.

Methods you can use for changing the attributes of these type of lights:

#define IND_POINT_LIGHT   102

A point light represents a point source. It has a position in the world and radiates light in all directions. A bare bulb on a stand would be an example of this. It radiates light in every direction and has a position in the world. This is a more expensive type of light in terms of frame rate than a directional light.

A point light has an attenuation (use IND_Light::SetAttenuation()) that defines how the light level decreases over distance and a range. The range (use IND_Light::SetRange()) is the maximum distance the light will travel.

Methods you can use for changing the attributes of these type of lights:

#define IND_SPOT_LIGHT   103

Spot light is is the most complex light and is the most expensive type in terms of frame rate so use sparingly. A spot light has a position in space and a direction. It emits a cone of light with two degrees of intensity. It has a central brightly lit section and a surrounding dimly lit section that merges with the surrounding shadow. Only objects within the light cone are illuminated.

To set a spot light you need to provide position, direction, cone size and a number of parameters determining the spread of the cone. Theta (use IND_Light::SetTheta()) is the angle that defines the inner cone while Phi (use IND_Light::SetPhi()) defines the outer cone. Falloff (use IND_Light::SetFalloff()) defines the decrease in illumination between the outside of the inner cone and the outside of the outer cone

Methods you can use for changing the attributes of these type of lights:


Typedef Documentation

typedef int IND_LightType

Light types.

IND_LightType is the type of the light

You can define different type of lights using this type.


Generated on Tue Apr 22 16:46:52 2008 for IndieLib by  doxygen 1.5.4