Encapsulates the creation, deletion and manipulation of area lights.
#include <AlAreaLight.h>
class AlAreaLight: public AlDirectionLight
AlAreaLight();
virtual ~AlAreaLight();
statusCode create();
virtual AlObject* copyWrapper() const;
AlObjectType type() const;
statusCode longAxis( double&, double&, double& ) const;
statusCode shortAxis( double&, double&, double& ) const;
statusCode setLongAxis( double, double, double );
statusCode setShortAxis( double, double, double );
statusCode cornerPoints( double&, double&, double&, double&, double&, double&) const;
An area light is a rectangular area that emits light in all directions. An area light would be used, for instance, to simulate bright light coming through a rectangular window. The size of the rectangle is defined by a long and short axis.
To create an area light, the user must instantiate and call the create method on an AlAreaLight object. (For more information on lights in general, see the Class Description of the AlDirectionLight object.)
To determine the orientation of the rectangular area of this light, use the worldPosition() of this light and the method cornerPoints(). The cornerPoints() method returns points A and B in world space, as in the following diagram: (WP is the World Position)
Although this class inherits methods to access the ’look at’ and ’up’ nodes of a light, they are not used. The direction and twist of an area light is changed by translating and rotating the transformation of the light’s position node.
statusCode AlAreaLight::longAxis( double &x, double &y, double &z) const
statusCode AlAreaLight::shortAxis( double &x, double &y, double &z) const
statusCode AlAreaLight::setLongAxis( double x, double y, double z )
statusCode AlAreaLight::setShortAxis( double x, double y, double z )
statusCode AlAreaLight::cornerPoints( double &x1, double &y1, double &z1,double &x2, double &y2, double &z2) const
Returns the corner points of the rectangular area of this area light. The corner points are in world space. The corner points are A and B in the following diagram (WP is World Position of the light)
> double &x1 - the world space short axis corner point in x direction
> double &y1 - the world space short axis corner point in y direction
> double &z1 - the world space short axis corner point in z direction
> double &x2 - the world space long axis corner point in x direction
> double &y2 - the world space long axis corner point in y direction
> double &z2 - the world space long axis corner point in z direction