Encapsulates the functionality common to all directional lights.
#include <AlDirectionLight.h>
class AlDirectionLight: public AlNonAmbientLight
AlDirectionLight();
virtual ~AlDirectionLight();
virtual AlObject* copyWrapper() const;
statusCode create();
AlObjectType type() const;
AlLightNode* lookAtNode() const;
AlLightNode* upNode() const;
virtual statusCode direction( double&, double&, double& ) const;
virtual statusCode setDirection( double, double, double );
There are two ways that this class is used. If the user instantiates and calls the create method on an AlDirectionLight, the resulting object is a light that has color, intensity, and direction but no obvious source in a scene. This type of direction light does not decay with distance. Sunlight is a direction light of this type.
Alternatively, the user could instantiate and create an AlSpotLight, AlLinearLight, or AlAreaLight (which are all considered "directional" and which are all derived from this light class).
Although all direction lights can access the "look at" and "up" nodes of a light, only the spot light uses these nodes.
statusCode AlDirectionLight::direction( double &x, double &y, double &z ) const
Returns a world space vector indicating the direction that this light is pointing. The default direction for the light is (0,0,-1)
statusCode AlDirectionLight::setDirection( double x, double y, double z )
This is a ’convenience’ function. It calculates rotations in the DAG node to set the world direction of the light. This will overwrite the current rotations in the light node. The default direction for the light is (0,0,-1)