#include <CameraLoader.h>
Public Member Functions | |
CameraLoader (std::string camFile) | |
virtual | ~CameraLoader () |
Camera * | getCamera () |
bool | goToFrame (const int &n) |
bool | nextFrame () |
Private Member Functions | |
void | init () |
Private Attributes | |
PerspectiveCamera | camera |
std::string | name |
bool | initialised |
Definition at line 14 of file CameraLoader.h.
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.
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 | ( | ) |
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().
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] |
bool rcrt::CameraLoader::initialised [private] |