#include <PerspectiveCamera.h>
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 Vec3D & | getDirection () |
virtual const Vec3D & | getXAxis () |
virtual const Vec3D & | getUp () |
virtual const Point3D & | getPosition () |
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 |
Definition at line 12 of file PerspectiveCamera.h.
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.
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().
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().
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().
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] |