rcrt::PerspectiveCamera Class Reference

#include <PerspectiveCamera.h>

Inheritance diagram for rcrt::PerspectiveCamera:

Inheritance graph
[legend]
Collaboration diagram for rcrt::PerspectiveCamera:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 PerspectiveCamera ()
 PerspectiveCamera (float angle, const Point3D &p, const Vec3D &d, const Vec3D &u, const int &resX, const int &resY)
virtual ~PerspectiveCamera ()
void initialise (float angle, const Point3D &p, const Vec3D &d, const Vec3D &u, const int &resX, const int &resY)
void update (const Point3D &p, const Vec3D &d, const Vec3D &u)
virtual Ray getRay (const Point2D &px) const
virtual void setResolution (const int &resX, const int &resY)
virtual void setAngle (const float &angle)
virtual const Vec3DgetDirection ()
virtual const Vec3DgetXAxis ()
virtual const Vec3DgetUp ()
virtual const Point3DgetPosition ()
virtual const float getAngle ()
virtual const float & getFocus ()

Private Attributes

float vangle
Point3D pos
Vec3D dir
Vec3D up
bool init
float focus
Vec3D xAxis
Vec3D yAxis
Vec3D zAxis
float aspect


Detailed Description

A perspective camera class.

Definition at line 12 of file PerspectiveCamera.h.


Constructor & Destructor Documentation

rcrt::PerspectiveCamera::PerspectiveCamera (  ) 

Definition at line 7 of file PerspectiveCamera.cpp.

rcrt::PerspectiveCamera::PerspectiveCamera ( float  angle,
const Point3D p,
const Vec3D d,
const Vec3D u,
const int &  resX,
const int &  resY 
)

Definition at line 11 of file PerspectiveCamera.cpp.

References rcrt::Vec3D::crossP(), dir, rcrt::Vec3D::normalize(), setResolution(), up, xAxis, yAxis, and zAxis.

rcrt::PerspectiveCamera::~PerspectiveCamera (  )  [virtual]

Definition at line 25 of file PerspectiveCamera.cpp.


Member Function Documentation

void rcrt::PerspectiveCamera::initialise ( float  angle,
const Point3D p,
const Vec3D d,
const Vec3D u,
const int &  resX,
const int &  resY 
)

Definition at line 29 of file PerspectiveCamera.cpp.

References rcrt::Vec3D::crossP(), dir, init, rcrt::Vec3D::normalize(), pos, setResolution(), up, vangle, xAxis, yAxis, and zAxis.

Referenced by setAngle().

void rcrt::PerspectiveCamera::update ( const Point3D p,
const Vec3D d,
const Vec3D u 
)

Definition at line 47 of file PerspectiveCamera.cpp.

References rcrt::Vec3D::crossP(), dir, init, rcrt::Vec3D::normalize(), pos, rcrt::Camera::resolutionX, rcrt::Camera::resolutionY, setResolution(), up, xAxis, yAxis, and zAxis.

Referenced by rcrt::CameraLoader::goToFrame(), and rcrt::CameraLoader::nextFrame().

Ray rcrt::PerspectiveCamera::getRay ( const Point2D px  )  const [virtual]

Implements rcrt::Camera.

Definition at line 64 of file PerspectiveCamera.cpp.

References aspect, focus, init, rcrt::Vec3D::normalize(), pos, rcrt::Camera::resolutionX, rcrt::Camera::resolutionY, rcrt::Point2D::x(), xAxis, rcrt::Point2D::y(), yAxis, and zAxis.

Referenced by testDispl1().

void rcrt::PerspectiveCamera::setResolution ( const int &  resX,
const int &  resY 
) [virtual]

Implements rcrt::Camera.

Definition at line 75 of file PerspectiveCamera.cpp.

References aspect, focus, rcrt::Camera::resolutionX, rcrt::Camera::resolutionY, and vangle.

Referenced by rcrt::CameraLoader::init(), initialise(), PerspectiveCamera(), and update().

void rcrt::PerspectiveCamera::setAngle ( const float &  angle  )  [virtual]

Definition at line 84 of file PerspectiveCamera.cpp.

References dir, initialise(), pos, rcrt::Camera::resolutionX, rcrt::Camera::resolutionY, and up.

Referenced by rcrt::CameraLoader::init().

const Vec3D & rcrt::PerspectiveCamera::getDirection (  )  [virtual]

Implements rcrt::Camera.

Definition at line 89 of file PerspectiveCamera.cpp.

References dir.

Referenced by rcrt::StereoMetaTracer::StereoMetaTracer().

const Vec3D & rcrt::PerspectiveCamera::getXAxis (  )  [virtual]

Definition at line 94 of file PerspectiveCamera.cpp.

References xAxis.

Referenced by rcrt::StereoMetaTracer::StereoMetaTracer().

const Vec3D & rcrt::PerspectiveCamera::getUp (  )  [virtual]

Definition at line 99 of file PerspectiveCamera.cpp.

References up.

Referenced by rcrt::StereoMetaTracer::StereoMetaTracer().

const Point3D & rcrt::PerspectiveCamera::getPosition (  )  [virtual]

Definition at line 104 of file PerspectiveCamera.cpp.

References pos.

Referenced by rcrt::StereoMetaTracer::StereoMetaTracer().

const float rcrt::PerspectiveCamera::getAngle (  )  [virtual]

Definition at line 109 of file PerspectiveCamera.cpp.

References vangle.

Referenced by rcrt::StereoMetaTracer::StereoMetaTracer().

const float & rcrt::PerspectiveCamera::getFocus (  )  [virtual]

Definition at line 114 of file PerspectiveCamera.cpp.

References focus.

Referenced by rcrt::StereoMetaTracer::StereoMetaTracer().


Member Data Documentation

float rcrt::PerspectiveCamera::vangle [private]

Definition at line 15 of file PerspectiveCamera.h.

Referenced by getAngle(), initialise(), and setResolution().

Point3D rcrt::PerspectiveCamera::pos [private]

Definition at line 16 of file PerspectiveCamera.h.

Referenced by getPosition(), getRay(), initialise(), setAngle(), and update().

Vec3D rcrt::PerspectiveCamera::dir [private]

Definition at line 17 of file PerspectiveCamera.h.

Referenced by getDirection(), initialise(), PerspectiveCamera(), setAngle(), and update().

Vec3D rcrt::PerspectiveCamera::up [private]

Definition at line 17 of file PerspectiveCamera.h.

Referenced by getUp(), initialise(), PerspectiveCamera(), setAngle(), and update().

bool rcrt::PerspectiveCamera::init [private]

Definition at line 18 of file PerspectiveCamera.h.

Referenced by getRay(), initialise(), and update().

float rcrt::PerspectiveCamera::focus [private]

Definition at line 20 of file PerspectiveCamera.h.

Referenced by getFocus(), getRay(), and setResolution().

Vec3D rcrt::PerspectiveCamera::xAxis [private]

Definition at line 21 of file PerspectiveCamera.h.

Referenced by getRay(), getXAxis(), initialise(), PerspectiveCamera(), and update().

Vec3D rcrt::PerspectiveCamera::yAxis [private]

Definition at line 21 of file PerspectiveCamera.h.

Referenced by getRay(), initialise(), PerspectiveCamera(), and update().

Vec3D rcrt::PerspectiveCamera::zAxis [private]

Definition at line 21 of file PerspectiveCamera.h.

Referenced by getRay(), initialise(), PerspectiveCamera(), and update().

float rcrt::PerspectiveCamera::aspect [private]

Definition at line 22 of file PerspectiveCamera.h.

Referenced by getRay(), and setResolution().


The documentation for this class was generated from the following files:
Generated on Thu Jan 31 19:32:22 2008 for RenderingCompetitionRayTracer by  doxygen 1.5.3