#include <AlNonAmbientLight.h>
class AlNonAmbientLight: public AlLight
virtual ~AlNonAmbientLight();
virtual AlObject* copyWrapper() const = 0;
AlObjectType type() const;
AlNonAmbientLight* asNonAmbientLightPtr();
double intensity() const;
int decay() const;
boolean shadows() const;
statusCode setIntensity( double );
statusCode setDecay( int );
statusCode setShadows( boolean );
To create a non-ambient light, the user must instantiate and call the create method on a specific type of light (as listed above). For more information on lights in general, see the Class Description of the AlLight object.
Summary
AlNonAmbientLight::~AlNonAmbientLight()
Description
Deletes an AlNonAmbientLight wrapper object. AlObjectType AlNonAmbientLight::type() const
Description
Returns the class identifier, kNonAmbientLightType. AlNonAmbientLight* AlNonAmbientLight::asNonAmbientLightPtr()
Description
This virtual function returns a non-null pointer to itself, indicating that it is safe to cast to an object of this class. double AlNonAmbientLight::intensity() const
Description
Returns the light's intensity. Allowable range is from 0.0 to infinity. This method returns -1 if the light is invalid. int AlNonAmbientLight::decay() const
Description
Returns the light's decay. Decay controls how quickly the light fades with distance; that is, how far it reaches. It can be set to 0, 1, 2, or 3. A value of 0 means no decay - the light reaches everything. A value of 1 is standard decay. Higher values increase the decay exponentially: 2 squares it; 3 cubes it. The initial default is 1. Decay has no effect at distances less than one unit. This method returns -1 if the light is invalid or if there is an error. boolean AlNonAmbientLight::shadows() const
Description
Returns the light's shadow flag. If the shadows flag is TRUE, then this light will cast shadows if ray tracing is used to render an image. Default is FALSE. statusCode AlNonAmbientLight::setIntensity( double newIntensity)
Description
Sets the light's intensity. The allowable range for the intensity is from 0.0 to infinity. Arguments
< double newIntensity - is the new light intensity Return codes
sSuccess - setting intensity succeeded statusCode AlNonAmbientLight::setDecay( int newDecay )
Description
Sets the light's decay. The decay controls how quickly the light fades with distance; that is, how far it reaches. It can be set to 0, 1, 2, or 3. A value of 0 means no decay - the light reaches everything. A value of 1 is a standard linear decay. Higher values increase the decay exponentially, i.e. 2 squares it and 3 cubes it. The initial default is 1. The decay has no effect at distances less than one unit. Arguments
< int newDecay - is the new decay value Return codes
sSuccess - setting decay succeeded statusCode AlNonAmbientLight::setShadows( boolean shadows )
Description
Sets the light's shadow flag. If the shadows flag is TRUE, then this light will cast shadows if ray tracing is used to render an image. The default state is is FALSE. Arguments
< boolean shadows - the new value of the shadow flag Return codes
sSuccess - shadows set