The DAG node class for lights.
#include <AlLightNode.h> class AlLightNode: public AlDagNode virtual ~AlLightNode(); virtual AlObject * copyWrapper() const; statusCode deleteObject(); AlObjectType type() const; AlLight* light() const; AlLight* light(AlTM&) const; virtual boolean isInstanceable(); boolean isLookAtNode() const; boolean isUpNode() const; boolean isPositionNode() const;
This class is a DAG node class used specifically for lights. Each AlLight object has three light nodes for position, ’look at’ and ’up’ points. (For more information on how AlLights and AlLightNodes work together, see the class description for the AlLight object.)
To create a light node, the user must create a specific type of light, which creates the necessary light nodes. These light nodes are grouped and inserted into the universe’s DAG. The user cannot directly instantiate a light node.
To figure out whether or not a light node represents a position, a ’look at’ or an ’up’ point, the user can use:
1) the isPositionNode(), isLookAtNode(), isUpNode() methods, or
2) the type() method of the attached AlLight object.
A light node can be deleted in two ways. When a light node is deleted, its associated light (and other light nodes) are deleted. Alternatively, when a light is deleted, its light nodes are also deleted.
Deletes an AlLightNode wrapper object.
Returns an exact duplicate of this AliLightNode.
Deletes all objects associated with this light node. It deletes the attached light object, which in turn deletes the other attached light DAG nodes. A light can be deleted in two ways. If AlLight::deleteObject() is called, it deletes the associated AlLightNodes. If AlLightNode::deleteObject() is called, it deletes the associated AlLight.
sSuccess - the light node and light were deleted
sInvalidObject - light node is invalid
sFailure - an error occurred
Returns the light node type, kLightNodeType (for the light’s position node), kLightUpNodeType (for the light’s up node), and kLightLookAtNodeType (for the light’s look at node).
Returns a pointer to the attached light object. If the light does not exist or is not the right type, then NULL is returned.
Returns a pointer to the attached light object. If the light does not exist or is not the right type, then NULL is returned. The AlTM will be updated with the lightNode’s TM if a light exists.
> tm - the transformation matrix to update with the lightnode’s TM
Returns FALSE. An AlLightNode is not an instanceable DAG node.
Returns TRUE if this node is a ’look at’ node.
Returns TRUE if this node is a ’up’ node.
Returns TRUE if this node is a ’position’ node.