#include <Camera.h>
Inherited by DepthOfFieldCamera, and PerspectiveCamera.
Inheritance diagram for Camera:
Public Member Functions | |
Camera (Vec3f pos, int resX, int resY) | |
virtual | ~Camera () |
virtual Ray | initRay (float x, float y)=0 |
const Vec3f & | pos () const |
int | resX () const |
int | resY () const |
virtual void | setPos (Vec3f pos)=0 |
virtual void | setDir (Vec3f dir)=0 |
virtual void | setUp (Vec3f up)=0 |
virtual const Vec3f & | up () const=0 |
virtual const Vec3f & | dir () const=0 |
virtual const float | focusDistance () const=0 |
virtual const float | aperture () const=0 |
virtual int | depthSamples () const=0 |
virtual void | setDepthSamples (unsigned int)=0 |
virtual void | setFocusDistance (float f)=0 |
virtual void | setAperture (float a)=0 |
virtual void | setSlowCorrect ()=0 |
virtual void | setFastIncorrect ()=0 |
Protected Attributes | |
Vec3f | mPos |
Position. | |
int | mResX |
X resolution. | |
int | mResY |
Y resolution. |
Definition at line 12 of file Camera.h.
Camera::Camera | ( | Vec3f | pos, | |
int | resX, | |||
int | resY | |||
) | [inline] |
virtual Ray Camera::initRay | ( | float | x, | |
float | y | |||
) | [pure virtual] |
Initialize a ray for pixel. Fractional coordinates are possible
x | X coordinate of the pixel | |
y | Y coordinate of the pixel |
Implemented in DepthOfFieldCamera, and PerspectiveCamera.
const Vec3f& Camera::pos | ( | ) | const [inline] |
Get camera position
Definition at line 45 of file Camera.h.
References mPos.
Referenced by CameraInstructionMove::execute(), DepthOfFieldCamera::initRay(), PerspectiveCamera::setPos(), and DepthOfFieldCamera::setPos().
int Camera::resX | ( | ) | const [inline] |
Get X resolution
Definition at line 52 of file Camera.h.
References mResX.
Referenced by Renderer::render().
int Camera::resY | ( | ) | const [inline] |
Get Y resolution
Definition at line 59 of file Camera.h.
References mResY.
Referenced by Renderer::render().
virtual void Camera::setPos | ( | Vec3f | pos | ) | [pure virtual] |
sets the position of the camera
Implemented in DepthOfFieldCamera, and PerspectiveCamera.
Referenced by CameraInstructionMove::execute().
virtual void Camera::setDir | ( | Vec3f | dir | ) | [pure virtual] |
sets the viewing direction of the camera
Implemented in DepthOfFieldCamera, and PerspectiveCamera.
Referenced by CameraInstructionMove::execute().
virtual void Camera::setUp | ( | Vec3f | up | ) | [pure virtual] |
sets the up vector of the camera
Implemented in DepthOfFieldCamera, and PerspectiveCamera.
Referenced by CameraInstructionMove::execute().
virtual const Vec3f& Camera::up | ( | ) | const [pure virtual] |
gets the up vector of the camera
Implemented in DepthOfFieldCamera, and PerspectiveCamera.
Referenced by CameraInstructionMove::execute().
virtual const Vec3f& Camera::dir | ( | ) | const [pure virtual] |
gets the dir vector of the camera
Implemented in DepthOfFieldCamera, and PerspectiveCamera.
Referenced by CameraInstructionMove::execute().
virtual const float Camera::focusDistance | ( | ) | const [pure virtual] |
gets the focus distance of the camera
Implemented in DepthOfFieldCamera, and PerspectiveCamera.
Referenced by CameraInstructionMove::execute().
virtual const float Camera::aperture | ( | ) | const [pure virtual] |
gets the aperture of the camera
Implemented in DepthOfFieldCamera, and PerspectiveCamera.
Referenced by CameraInstructionMove::execute().
virtual int Camera::depthSamples | ( | ) | const [pure virtual] |
Get the number of samples we use for Depth of Field effect
Implemented in DepthOfFieldCamera, and PerspectiveCamera.
Referenced by CameraInstructionMove::execute().
virtual void Camera::setDepthSamples | ( | unsigned | int | ) | [pure virtual] |
sets the number of samples we use for Depth of Field effect
Implemented in DepthOfFieldCamera, and PerspectiveCamera.
Referenced by CameraInstructionMove::execute().
virtual void Camera::setFocusDistance | ( | float | f | ) | [pure virtual] |
set the focus distance
Implemented in DepthOfFieldCamera, and PerspectiveCamera.
Referenced by CameraInstructionMove::execute().
virtual void Camera::setAperture | ( | float | a | ) | [pure virtual] |
sets the aperture
Implemented in DepthOfFieldCamera, and PerspectiveCamera.
Referenced by CameraInstructionMove::execute().
virtual void Camera::setSlowCorrect | ( | ) | [pure virtual] |
enables the slow algorithm
Implemented in DepthOfFieldCamera, and PerspectiveCamera.
virtual void Camera::setFastIncorrect | ( | ) | [pure virtual] |
enables the fast algorithm
Implemented in DepthOfFieldCamera, and PerspectiveCamera.
Vec3f Camera::mPos [protected] |
Position.
Definition at line 118 of file Camera.h.
Referenced by PerspectiveCamera::initRay(), DepthOfFieldCamera::initRay(), pos(), PerspectiveCamera::setPos(), and DepthOfFieldCamera::setPos().
int Camera::mResX [protected] |
X resolution.
Definition at line 121 of file Camera.h.
Referenced by PerspectiveCamera::initRay(), DepthOfFieldCamera::initRay(), resX(), PerspectiveCamera::setDir(), DepthOfFieldCamera::setDir(), PerspectiveCamera::setUp(), and DepthOfFieldCamera::setUp().
int Camera::mResY [protected] |
Y resolution.
Definition at line 124 of file Camera.h.
Referenced by PerspectiveCamera::initRay(), DepthOfFieldCamera::initRay(), resY(), PerspectiveCamera::setDir(), DepthOfFieldCamera::setDir(), PerspectiveCamera::setUp(), and DepthOfFieldCamera::setUp().