rcrt::CameraLoader Class Reference

#include <CameraLoader.h>

Inheritance diagram for rcrt::CameraLoader:

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

Collaboration graph
[legend]

List of all members.

Public Member Functions

 CameraLoader (std::string camFile)
virtual ~CameraLoader ()
CameragetCamera ()
bool goToFrame (const int &n)
bool nextFrame ()

Private Member Functions

void init ()

Private Attributes

PerspectiveCamera camera
std::string name
bool initialised


Detailed Description

Loads camera data. Supports per frame camera information to allow for camera paths.

Definition at line 14 of file CameraLoader.h.


Constructor & Destructor Documentation

rcrt::CameraLoader::CameraLoader ( std::string  camFile  ) 

Definition at line 9 of file CameraLoader.cpp.

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

Definition at line 13 of file CameraLoader.cpp.


Member Function Documentation

void rcrt::CameraLoader::init (  )  [private]

Definition at line 17 of file CameraLoader.cpp.

References camera, initialised, name, rcrt::XMLLoader::nextStartTag(), rcrt::XMLLoader::parser, rcrt::PerspectiveCamera::setAngle(), and rcrt::PerspectiveCamera::setResolution().

Referenced by goToFrame(), and nextFrame().

Camera * rcrt::CameraLoader::getCamera (  ) 

Definition at line 31 of file CameraLoader.cpp.

References camera.

bool rcrt::CameraLoader::goToFrame ( const int &  n  )  [virtual]

Loads info of frame n.

Implements rcrt::XMLLoader.

Definition at line 71 of file CameraLoader.cpp.

References camera, rcrt::XMLLoader::currentFrame, rcrt::XMLLoader::eof, init(), initialised, rcrt::XMLLoader::nextStartTag(), rcrt::XMLLoader::parser, and rcrt::PerspectiveCamera::update().

bool rcrt::CameraLoader::nextFrame (  )  [virtual]

Loads info from next frame. If on starting tag of frame, load this one, else go to next frame starting tag and load from that.

Implements rcrt::XMLLoader.

Definition at line 36 of file CameraLoader.cpp.

References camera, rcrt::XMLLoader::currentFrame, rcrt::XMLLoader::eof, init(), initialised, rcrt::XMLLoader::nextStartTag(), rcrt::XMLLoader::parser, and rcrt::PerspectiveCamera::update().


Member Data Documentation

PerspectiveCamera rcrt::CameraLoader::camera [private]

Definition at line 17 of file CameraLoader.h.

Referenced by getCamera(), goToFrame(), init(), and nextFrame().

std::string rcrt::CameraLoader::name [private]

Definition at line 18 of file CameraLoader.h.

Referenced by init().

bool rcrt::CameraLoader::initialised [private]

Definition at line 19 of file CameraLoader.h.

Referenced by goToFrame(), init(), and nextFrame().


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