C3DLight::SetAmbient

Top  Previous  Next

Syntax:
 
SetAmbient(float  r, float  g, float  b, float  a)
 
Purpose:
Sets the ambient color of the light

 
Parameters:
r, g, b, a - Then new ambient color

 
Returned value(s):
None

 
Application:

light.Create(s,LIGHT_POINT,1)
light.Position(0,20,-100)
light.SetAttenuation(0,1/200.0,0)
light.SetSpecular(.5,.5,.5,1)
light.SetAmbient(.4,.4,.4,1)

 

Class Hierarchy
C3DObject
-------C3DLight
 
Additional Info:

Ambient lighting provides constant lighting for a scene. It lights all object vertices the same because it is not dependent on any other lighting factors such as vertex normals, light direction, light position, range, or attenuation. It is the fastest type of lighting but it produces the least realistic results.

 

Each light object that has an ambient color adds to the total ambient lighting in the scene. Although Direct3D uses RGBA values for lights, the alpha color component is not used.
 
See Also:

SetDiffuse, SetSpecular