AlCameraNode
 
 
 

Dag node class for cameras.

Synopsis

#include <AlCameraNode.h>
class AlCameraNode : public AlDagNode
virtual	~AlCameraNode();
virtual AlObject*	copyWrapper() const;
virtual statusCode	deleteObject();
virtual AlObjectType	type() const;
virtual boolean	isInstanceable();
boolean	isEyeNode() const;
boolean	isViewNode() const;
boolean	isUpNode() const;
AlCamera*	camera() const;
AlCamera*	camera(AlTM&) const;

Description

This class is a DAG node class used specifically for cameras. Each AlCamera object has three camera nodes, one for each of eye, view, and up positions. (For more information on how AlCamera’s and AlCameraNode’s work together, see the Class Description for the AlCamera object.)

To create a camera node, the user must create a camera, which will is create the necessary camera nodes. The user cannot directly instantiate an AlCameraNode.

To figure out which position a camera node represents, the user can use:

1) the isEyeNode(), isViewNode(), isUpNode() methods, or

2) the type() method to compare types with kCameraEyeType, kCameraUpType, or kCameraViewType.

A camera node can be deleted in two ways. When a camera node is deleted, its associated camera (and other camera nodes) are deleted. When a camera is deleted, its camera nodes are also deleted.

AlCameraNode::~AlCameraNode()

Description

Deletes an AlCameraNode wrapper object.

AlObject* AlCameraNode::copyWrapper() const

Description

Makes a copy of the AlCameraNode. The returned AlCameraNode will reference the same data as the original.

statusCode AlCameraNode::deleteObject()

Description

Deletes the associated AlCamera (which in turn deletes all the attached camera eye, view and up nodes).

Return Codes

sSuccess - the camera data was successfully deleted

sInvalidObject - the camera was not valid

AlObjectType AlCameraNode::type() const

Description

Returns the class identifier for a camera node. This can be any one of kCameraEyeType, kCameraViewType, or kCameraUpType.

boolean AlCameraNode::isInstanceable()

Description

Returns FALSE. An AlCameraNode is not an instanceable DAG node.

boolean AlCameraNode::isEyeNode() const

Description

Returns TRUE if this camera node represents the eye position of a camera.

boolean AlCameraNode::isViewNode() const

Description

Returns TRUE if this camera node represents the view position of a camera.

boolean AlCameraNode::isUpNode() const

Description

Returns TRUE if this camera node represents the up position of a camera.

AlCamera* AlCameraNode::camera() const

Description

Returns a pointer to the attached AlCamera object.

AlCamera* AlCameraNode::camera(AlTM& tm) const

Description

Returns a pointer to the attached camera object. The AlTM is updated with the cameraNode’s TM if a camera exists.

Arguments

> tm - the transformation matrix to be updated with the cameraNode’s TM