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

CameraPerspLookAt Class Reference

#include <cameras.h>

Inheritance diagram for CameraPerspLookAt:

CameraPerspective Camera

List of all members.


Detailed Description

A perspective camera that looks at a specific location.

Definition at line 244 of file cameras.h.


Public Member Functions

virtual void apply (float outputRatio, const BoundCube &b, bool loadIdentity, float leftRestrict, float rightRestrict, float topRestrict, float bottomRestrict) const
 Apply, restricting viewport to subresgion.
void apply (float outAspect, const BoundCube &boundCube, bool loadIdentity=true) const
 Applies the view transform.
 CameraPerspLookAt ()
 Constructor.
Cameraclone () const
 clone function
virtual void ensureVisible (const BoundCube &b, unsigned int face=3)
 Ensure that the box is visible.
void forwardsDolly (float dollyAmount)
 Do a forwards "dolly",where the camera moves along its viewing axis.
float getFarPlane () const
 get the camera's near clipping plane
float getFOV () const
 Get the camera's FOV angle (full angle across).
float getNearPlane () const
 get the camera's near clipping plane
Point3D getOrigin () const
 Return the origin of the camera.
void getProperties (CameraProperties &p) const
 Return the user-settable properties of the camera.
Point3D getTarget () const
 Get the look at target.
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.
void move (float leftRightAmount, float UpDownAmount)
 Move the camera origin.
void pivot (float lrRad, float udRad)
 Simulate pivot of camera.
bool readState (xmlNodePtr nodePtr)
 Read the state of the camera.
void recomputeUpDirection ()
 Ensure that up direction is perpendicular to view direction.
void roll (float rollRad)
 Roll around the view direction.
void setFOV (float newFov)
 Set the camera's FOV angle.
void setNearPlane (float f)
 Set the camera's near clipping plane.
void setOrigin (const Point3D &)
 Set the look at target.
bool setProperty (unsigned int key, const std::string &value)
 Set the camera property from a key & string pair.
void setTarget (const Point3D &)
 Set the look at target.
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
void translate (float lrTrans, float udTrans)
 Move the camera origin.
unsigned int type () const
bool writeState (std::ostream &f, unsigned int format, unsigned int tabs=0) const
 Write the state of the camera.
virtual ~CameraPerspLookAt ()
 Destructor.

Protected Member Functions

void doPerspCalcs (float aspect, const BoundCube &bc, bool loadIdentity, float left, float top) const
void doPerspCalcs (float aspect, const BoundCube &bc, bool loadIdentity) const
 Do the perspective calculations.
void recomputeViewDirection ()

Protected Attributes

float farPlane
 Far plane is computed on-the-fly. cannot be set directly. Oh no! mutable. gross!
float fovAngle
 Perspective FOV.
float nearPlane
 Near clipping plane distance.
Point3D origin
 Camera location.
Point3D target
 Location for camera to look at.
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.
std::ostream & operator<< (std::ostream &stream, const CameraPerspective &)
 Streaming output operator, presents human readable text.
std::ostream & operator<< (std::ostream &stream, const CameraPerspLookAt &)
 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