A base class that encapsulates behavior of perspective.
#include <AlCamera.h>
class AlCamera : public AlObject
virtual ~AlCamera();
virtual statusCode deleteObject();
virtual AlObject* copyWrapper() const;
virtual AlObjectType type() const;
virtual const char* name() const;
virtual statusCode setName( const char* );
statusCode addImagePlane( const char * );
AlImagePlane* firstImagePlane( void );
statusCode applyIteratorToImagePlanes( AlIterator*, int& );
AlWindow* firstWindow( void );
AlWindow* nextWindow( AlWindow *lastWindow );
statusCode nextWindowD( AlWindow *lastWindow );
statusCode nearClippingPlane( double& ) const;
statusCode farClippingPlane( double& ) const;
statusCode setNearClippingPlane( double );
statusCode setFarClippingPlane( double );
statusCode stereoView(boolean&, double&) const;
statusCode setStereoView(boolean, double);
statusCode motionBlur(boolean&) const;
statusCode setMotionBlur(boolean);
This class represents all of the functionality of Alias perspective cameras. When the AlWindow class was developed and it became possible to get and set the window associated with a camera, it became necessary not only to provide an interface to orthographic cameras as well, but also to separate the differences in functionality into two child classes. The AlCamera class remains as a base class, providing access to the behavior that all cameras share. In places where AlCameras were formerly used, it is possible to easily convert old code simply by substituting AlPerspectiveCamera for AlCamera almost everywhere. (A few other small modifications may be necessary.)
Any camera can have image planes attached to it. To create an image plane on a camera, use the addImagePlane() method.
If a window is associated with this camera (which will always be the case for orthographic cameras, but not so for perspective cameras) the firstWindow() function will return it.
statusCode AlCamera::setName( const char *newName )
Changes the camera’s name to the given name. If the given name is not a unique one, then a unique name is generated based on the given name and assigned to the camera. In this case, a status code of sNameChangedToUniqueOne is returned. A copy of the argument string is made, so you are responsible for deleting it.
statusCode AlCamera::applyIteratorToImagePlanes( AlIterator* iter, int& rc )
statusCode AlCamera::setNearClippingPlane( double newNearDistance )
statusCode AlCamera::setFarClippingPlane( double newFarDistance)
statusCode AlCamera::stereoView(boolean& stereoEnabled, double& eyeOffset) const
statusCode AlCamera::setStereoView(boolean stereoEnabled, double eyeOffset)