#include <Camera.h>
Inheritance diagram for Camera:
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 | |
Camera (AutoPtr< Projection > *pAP) | |
Camera () | |
Camera (const Camera &src) | |
virtual | ~Camera () |
virtual void | setTransform (const Matrix4 &trMat) |
virtual void | unsetTransform () |
virtual void | rotateX (float angle) |
virtual void | rotateY (float angle) |
virtual void | rotateZ (float angle) |
virtual void | rotate (float angle, const Vector3 &axis) |
virtual void | translate (float x, float y, float z) |
virtual bool | isTransformed (Matrix4 *pTrMat) const |
virtual void | setProjection (AutoPtr< Projection > *pProj) |
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 |
Protected Attributes | |
Matrix4 * | _pTrMat |
AutoPtr< Projection > * | _pAProjection |
Projection * | _pProjection |
Definition at line 28 of file Camera.h.
|
|
|
Constuctor
Definition at line 7 of file Camera.cc. References Camera::_pAProjection, and Camera::_pProjection. |
|
Constuctor with orthogonal projection with (-1, +1) frustum Definition at line 16 of file Camera.cc. References Camera::_pAProjection, and Camera::_pProjection. |
|
Copy contructor. Both the tranformation and projection matrices are cloned.
Definition at line 27 of file Camera.cc. References Camera::_pAProjection, Camera::_pProjection, Camera::_pTrMat, and Projection::clone(). |
|
Destructor Definition at line 38 of file Camera.cc. References Camera::_pAProjection, and Camera::_pTrMat. |
|
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 in CameraGL. Definition at line 79 of file Camera.cc. References Camera::_pTrMat. Referenced by CameraGL::rotate(). |
|
Rotates the camera around X axis
Reimplemented in CameraGL. Definition at line 55 of file Camera.cc. References Camera::_pTrMat. Referenced by CameraGL::rotateX(). |
|
Rotates the camera around Y axis
Reimplemented in CameraGL. Definition at line 63 of file Camera.cc. References Camera::_pTrMat. Referenced by CameraGL::rotateY(). |
|
Rotates the camera around Z axis
Reimplemented in CameraGL. Definition at line 71 of file Camera.cc. References Camera::_pTrMat. Referenced by CameraGL::rotateZ(). |
|
Set new projection
Reimplemented in CameraGL. Definition at line 104 of file Camera.cc. References Camera::_pAProjection, and Camera::_pProjection. Referenced by CameraGL::setProjection(). |
|
Tranform _camera_
Reimplemented in CameraGL. Definition at line 44 of file Camera.cc. References Camera::_pTrMat. Referenced by CameraGL::setTransform(). |
|
Traslates the camera
Reimplemented in CameraGL. Definition at line 87 of file Camera.cc. References Camera::_pTrMat. Referenced by CameraGL::translate(). |
|
Clear camera transformations Reimplemented in CameraGL. Definition at line 50 of file Camera.cc. References Camera::_pTrMat. Referenced by CameraGL::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(). |
|