Encapsulates the creation, deletion and manipulation of an ambient light.
#include <AlAmbientLight.h> class AlAmbientLight : public AlLight AlAmbientLight(); virtual ~AlAmbientLight(); virtual AlObject* copyWrapper() const; statusCode create(); AlObjectType type() const; double shadeFactor() const; double intensity() const; statusCode setShadeFactor( double ); statusCode setIntensity( double );
An ambient light is similar to a point light, except that only a portion of the illumination comes from the point. The remainder of the illumination comes from all directions and lights everything uniformly.
(For more information on lights in general, see the Class Description of the AlLight class.)
Constructs an AlAmbientLight wrapper object.
Deletes an AlAmbientLight wrapper object.
Creates all the DAG nodes for this light and adds them to the universe. The DAG nodes are for ’position’, ’look at’ and ’up’, and another DAG node that groups these three together.
sSuccess - everything was successful
sInsufficientMemory - not enough memory available
sAlreadyCreated - light is already created
Returns the class identifier, kAmbientLightType.
Returns the light’s shade factor. Valid shade factors range from 0.0 to 1.0. Shade factor defines the omnidirectionality of the light. Set to 0.0, ambient light will come from all directions and surfaces will not show edge definition. Set to 1.0, the ambient light comes solely from the position of the light and objects will show definite edge contrast. If the light is not valid then -1 is returned.
Sets the light’s shade factor. Valid shade factors range from 0.0 to 1.0. Shade factor defines the omnidirectionality of the light. Set to 0.0, ambient light will come from all directions and surfaces will show not edge definition. Set to 1.0, the ambient light comes solely from the position of the light and objects will show definite edge contrast.
< double newShadeFactor - is the new shade factor
sSuccess - setting shade factor succeeded
sInvalidObject - the light was not valid
sFailure - not an ambient light
sInvalidArgument - shade out of range
Returns the intensity of this ambient light. The value returned is greater than or equal to 0.0. If the light is not valid -1 is returned.
Sets the intensity of this ambient light. The given intensity value must be greater than or equal to 0.0.
< newIntensity - the intensity that this light is set to
sSuccess - setting intensity succeeded
sInvalidObject - not a valid ambient light
sInvalidArgument - intensity out of range