Logo Search packages:      
Sourcecode: 3depict version File versions  Download package

Camera Class Reference

#include <cameras.h>

Inheritance diagram for Camera:

CameraOrthogonal CameraPerspective CameraPerspLookAt

List of all members.


Detailed Description

An abstract base class for a camera.

Definition at line 50 of file cameras.h.


Public Member Functions

virtual void apply (float outputRatio, const BoundCube &b, bool loadIdentity, float leftRestrict, float rightRestrict, float bottomRestrict, float topRestrict) const =0
 Applies the camera settings to openGL, restricting the viewport (range (-1, 1)).
virtual void apply (float outputRatio, const BoundCube &b, bool loadIdentity=true) const =0
 Applies the camera settings to openGL. Ensures the far planes.
 Camera ()
 constructor
virtual Cameraclone () const =0
 Duplication routine. Must delete returned pointer manually.
virtual void ensureVisible (const BoundCube &b, unsigned int face=3)=0
 Ensures that the given boundingbox should look nice, and be visible.
virtual void forwardsDolly (float dollyAmount)
 Do a forwards "dolly",where the camera moves along its viewing axis.
Point3D getOrigin () const
 Return the origin of the camera.
virtual void getProperties (CameraProperties &p) const =0
 Obtain the properties specific to a camera.
Point3D getUpDirection () const
 Return the up direction for the camera.
std::string getUserString () const
 Get the user string.
Point3D getViewDirection () const
 Return the view direction for the camera.
virtual void move (float leftRightAmount, float UpDownAmount)
 Move the camera origin.
virtual void pivot (float rollAroundAcross, float rollaroundUp)
 pivot the camera
virtual bool readState (xmlNodePtr nodePtr)=0
 Read the state of the camera from XML document.
virtual void roll (float roll)
 Roll around the view direction.
virtual void setOrigin (const Point3D &)
 Set the camera's position.
virtual bool setProperty (unsigned int key, const std::string &value)=0
 Set the camera property from a key & string pair.
void setUpDirection (const Point3D &)
 set the direction that the camera considers "up"
void setUserString (const std::string &newString)
 Set the user string.
void setViewDirection (const Point3D &)
 set the direction that the camera looks towards
virtual void translate (float leftRightAmount, float UpDownAmount)
 Move the camera origin.
unsigned int type () const
virtual bool writeState (std::ostream &f, unsigned int format, unsigned int tabs) const =0
 Write the state of the camera.
virtual ~Camera ()
 Destructor.

Protected Attributes

Point3D origin
 Camera location.
unsigned int typeNum
 Type number.
Point3D upDirection
 Up direction for camera (required to work out "roll").
std::string userString
 user string, e.g. camera name
Point3D viewDirection
 Direction camera is looking in.

Friends

std::ostream & operator<< (std::ostream &stream, const Camera &)
 Streaming output operator, presents human readable text.

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index