Camera Class Reference
Abstract camera that all Milton cameras subclass, representing a mapping from film-space to world-space and vice-versa. Cameras may optionally also specify an OpenGL preview projection matrix that can be used by OpenGLRenderer. Film-space is represented by (slightly modified) Normalized Device Coordinates (NDC), which are unit film-plane coordinates, with (x,y) both ranging inbetween 0 and 1. NDC lie in the unit square [0,1]^2, where [0,0] gets mapped to the upper left corner of the corresponding Viewport/Image, and [1,1] is the lower right corner. NDC film-space allows for mapping rendering results onto an arbitrarily-sized Viewport/Image. More...
#include <Camera.h>
Inheritance diagram for Camera:

Public Member Functions | |
Constructors | |
| Camera () | |
| virtual | ~Camera () |
Initialization | |
| virtual void | init (Scene *scene)=0 |
| Initializes camera state from its PropertyMap. | |
Main usage interface | |
| virtual Ray | getWorldRay (const Point2 &pt) const =0 |
| virtual Point2 | getProjection (const Point3 &p) const =0 |
| virtual Point2 | getProjection (const Point3 &p, const Viewport &v) const |
| virtual void | fillGLMatrix (real_t *buffer)=0 |
| Fills the 16-element, column-major buffer with an OpenGL projection matrix to preview the transformation of points from world-space to NDC using this camera model. | |
Accessors / Mutators | |
| virtual void | setOrientation (const Point3 &eye, const Vector3 &look, const Vector3 &up)=0 |
Sampling functionality | |
| virtual Point3 | getPosition (const UV &uv) |
Protected Member Functions | |
| virtual void | _getUV (SurfacePoint &pt) const |
| virtual void | _getGeometricNormal (SurfacePoint &pt) const |
Detailed Description
Abstract camera that all Milton cameras subclass, representing a mapping from film-space to world-space and vice-versa. Cameras may optionally also specify an OpenGL preview projection matrix that can be used by OpenGLRenderer. Film-space is represented by (slightly modified) Normalized Device Coordinates (NDC), which are unit film-plane coordinates, with (x,y) both ranging inbetween 0 and 1. NDC lie in the unit square [0,1]^2, where [0,0] gets mapped to the upper left corner of the corresponding Viewport/Image, and [1,1] is the lower right corner. NDC film-space allows for mapping rendering results onto an arbitrarily-sized Viewport/Image.
- Date:
- Fall 2008
- See also:
- ThinLensCamera
Definition at line 32 of file Camera.h.
Constructor & Destructor Documentation
Member Function Documentation
| virtual void Camera::init | ( | Scene * | scene | ) | [pure virtual] |
- Returns:
- a world-space ray for the given point on image plane
- Parameters:
-
pt is a point on the film plane expressed in NDC ([0,1]^2)
Implemented in ThinLensCamera.
- Returns:
- the projection of the given world-space point onto the film- plane (result is expressed in NDC ([0,1]^2))
Implemented in ThinLensCamera.
- Returns:
- the projection of the given world-space point onto the film- plane (result is expressed in pixel coordinates on the specified Viewport
v)
Definition at line 26 of file Camera.cpp.
| virtual void Camera::fillGLMatrix | ( | real_t * | buffer | ) | [pure virtual] |
Fills the 16-element, column-major buffer with an OpenGL projection matrix to preview the transformation of points from world-space to NDC using this camera model.
Implemented in ThinLensCamera.
| virtual void Camera::setOrientation | ( | const Point3 & | eye, | |
| const Vector3 & | look, | |||
| const Vector3 & | up | |||
| ) | [pure virtual] |
Implemented in ThinLensCamera.
| void Camera::_getUV | ( | SurfacePoint & | pt | ) | const [protected, virtual] |
| void Camera::_getGeometricNormal | ( | SurfacePoint & | pt | ) | const [protected, virtual] |
The documentation for this class was generated from the following files:
Generated on 28 Feb 2009 for Milton by
1.5.6