#include <CameraGL.h>
Inheritance diagram for CameraGL:
Public Types | |
enum | PixelSample { PS_CENTROID, PS_UPPER_LEFT_CORNER, PS_UPPER_RIGHT_CORNER, PS_LOWER_RIGHT_CORNER, PS_LOWER_LEFT_CORNER, PS_RANDOM } |
Public Member Functions | |
CameraGL (AutoPtr< Projection > *pAP) | |
CameraGL (const Camera &src) | |
virtual void | setTransform (const Matrix4 &trMat) |
virtual void | unsetTransform () |
virtual void | rotateX (float) |
virtual void | rotateY (float) |
virtual void | rotateZ (float) |
virtual void | rotate (float, const Vector3 &) |
virtual void | translate (float, float, float) |
virtual void | setProjection (AutoPtr< Projection > *) |
virtual bool | isTransformed (Matrix4 *pTrMat) const |
const Projection & | getProjection () const |
Vector2 | getPixelSize (unsigned resX, unsigned resY) const |
void | getProjectionPlane (Vector3 &ll, Vector3 &ul, Vector3 &ur, Vector3 &lr) const |
virtual Vector2 | mapPixelToProjPlane (unsigned posX, unsigned posY, unsigned resX, unsigned resY, PixelSample sample) const |
virtual Vector3 | getProjectionDirection (const Vector2 &point) |
virtual Vector3 | getDirection () |
virtual Vector3 | getZenith () |
virtual Vector2 | project (const Vector3 &point) const |
virtual bool | projectAndClip (const Vector3 &point, Vector2 *res) const |
Static Public Member Functions | |
static void | setOpenGLTransform (const Matrix4 &trMat) |
Static Protected Member Functions | |
static void | _set_orthogonal_proj (const Projection &) |
static void | _set_perspective_proj (const Projection &) |
Protected Attributes | |
Matrix4 * | _pTrMat |
AutoPtr< Projection > * | _pAProjection |
Projection * | _pProjection |
Definition at line 16 of file CameraGL.h.
|
|
|
Constuctor = projection of the camera Definition at line 36 of file CameraGL.cc. References Camera::_pProjection, CameraGL::_set_orthogonal_proj(), and CameraGL::_set_perspective_proj(). |
|
Copy contructor. Both the tranformation and projection matrices are cloned. OpenGL projection and/or transfomation matrices are set. = source camera Definition at line 49 of file CameraGL.cc. References Camera::_pProjection, Camera::_pTrMat, CameraGL::_set_orthogonal_proj(), CameraGL::_set_perspective_proj(), and CameraGL::setOpenGLTransform(). |
|
Definition at line 7 of file CameraGL.cc. References Projection::getBottomPlane(), Projection::getFarPlane(), Projection::getLeftPlane(), Projection::getNearPlane(), Projection::getRightPlane(), and Projection::getTopPlane(). Referenced by CameraGL::CameraGL(), and CameraGL::setProjection(). |
|
Definition at line 20 of file CameraGL.cc. References Projection::getBottomPlane(), Projection::getFarPlane(), Projection::getLeftPlane(), Projection::getNearPlane(), Projection::getRightPlane(), and Projection::getTopPlane(). Referenced by CameraGL::CameraGL(), and CameraGL::setProjection(). |
|
Definition at line 186 of file Camera.cc. References Camera::_pTrMat. |
|
Return space occupied by single pixel of frame-buffer
Definition at line 114 of file Camera.cc. References Camera::_pProjection, Projection::getBottomPlane(), Projection::getLeftPlane(), Projection::getRightPlane(), and Projection::getTopPlane(). Referenced by RTRender::_render(). |
|
Definition at line 138 of file Camera.h. Referenced by FrameBufferGL::setColor(). |
|
Return projection direction of the point at projection plane
Definition at line 175 of file Camera.cc. References Camera::_pProjection, Camera::_pTrMat, and Projection::getProjectionDirection(). Referenced by RTRender::_render_pixel_centroid(), RTRender::_render_pixel_corners(), RTRender::_render_pixel_randomly(), and RTRender::_render_pixel_stratified(). |
|
Returns corners of the projection area in the world coord. system
Definition at line 120 of file Camera.cc. References Camera::_pProjection, Camera::_pTrMat, and Projection::getProjectionArea(). Referenced by RTRender::_render(). |
|
Definition at line 197 of file Camera.cc. References Camera::_pTrMat. |
|
Check whether the camera is transformed. If so then return tr. mat
Definition at line 95 of file Camera.cc. References Camera::_pTrMat. |
|
Compute position of pixel on the projection plane of camera
Definition at line 134 of file Camera.cc. References Camera::_pProjection, Projection::getBottomPlane(), Projection::getLeftPlane(), Projection::getRightPlane(), Projection::getTopPlane(), Camera::PS_CENTROID, Camera::PS_LOWER_LEFT_CORNER, Camera::PS_LOWER_RIGHT_CORNER, Camera::PS_RANDOM, Camera::PS_UPPER_LEFT_CORNER, and Camera::PS_UPPER_RIGHT_CORNER. Referenced by RTRender::_render_pixel_centroid(), RTRender::_render_pixel_corners(), and RTRender::_render_pixel_randomly(). |
|
Project point is space onto the projection plane
Definition at line 208 of file Camera.cc. References Camera::_pProjection, Camera::_pTrMat, Projection::getBottomPlane(), Projection::getLeftPlane(), and Projection::project(). Referenced by RTRender::_render_pixel_stratified(). |
|
Project point is space onto the projection plane and then clip it
Definition at line 225 of file Camera.cc. References Camera::_pProjection, Camera::_pTrMat, Projection::getBottomPlane(), Projection::getLeftPlane(), and Projection::projectAndClip(). |
|
Rotates the camera around axis
Reimplemented from Camera. Definition at line 123 of file CameraGL.cc. References Camera::_pTrMat, Camera::rotate(), and CameraGL::setOpenGLTransform(). |
|
Rotates the camera around axis = angle in radians = axis to rotate around to Reimplemented from Camera. Definition at line 105 of file CameraGL.cc. References Camera::_pTrMat, Camera::rotateX(), and CameraGL::setOpenGLTransform(). |
|
Rotates the camera around Y axis
Reimplemented from Camera. Definition at line 111 of file CameraGL.cc. References Camera::_pTrMat, Camera::rotateY(), and CameraGL::setOpenGLTransform(). |
|
Rotates the camera around Z axis
Reimplemented from Camera. Definition at line 117 of file CameraGL.cc. References Camera::_pTrMat, Camera::rotateZ(), and CameraGL::setOpenGLTransform(). |
|
Do OpenGL transformation = new transformation matrix Definition at line 64 of file CameraGL.cc. Referenced by CameraGL::CameraGL(), CameraGL::rotate(), CameraGL::rotateX(), CameraGL::rotateY(), CameraGL::rotateZ(), CameraGL::setTransform(), and CameraGL::translate(). |
|
Set new projection = new projection Reimplemented from Camera. Definition at line 142 of file CameraGL.cc. References Camera::_pProjection, CameraGL::_set_orthogonal_proj(), CameraGL::_set_perspective_proj(), and Camera::setProjection(). |
|
Tranform camera = new transformation matrix Reimplemented from Camera. Definition at line 99 of file CameraGL.cc. References CameraGL::setOpenGLTransform(), and Camera::setTransform(). |
|
Traslates the camera , , = translation vector Reimplemented from Camera. Definition at line 129 of file CameraGL.cc. References Camera::_pTrMat, CameraGL::setOpenGLTransform(), and Camera::translate(). |
|
Clear camera transformations Reimplemented from Camera. Definition at line 135 of file CameraGL.cc. References Camera::unsetTransform(). |
|
Definition at line 31 of file Camera.h. Referenced by Camera::Camera(), Camera::setProjection(), and Camera::~Camera(). |
|
Definition at line 32 of file Camera.h. Referenced by Camera::Camera(), CameraGL::CameraGL(), Camera::getPixelSize(), Camera::getProjectionDirection(), Camera::getProjectionPlane(), Camera::mapPixelToProjPlane(), Camera::project(), Camera::projectAndClip(), CameraGL::setProjection(), and Camera::setProjection(). |
|