Nori
|
Generic camera interface. More...
#include <camera.h>
Public Member Functions | |
virtual Color3f | sampleRay (Ray3f &ray, const Point2f &samplePosition, const Point2f &apertureSample) const =0 |
Importance sample a ray according to the camera's response function. | |
const Vector2i & | getOutputSize () const |
Return the size of the output image in pixels. | |
const ReconstructionFilter * | getReconstructionFilter () const |
Return the camera's reconstruction filter in image space. | |
EClassType | getClassType () const |
Return the type of object (i.e. Mesh/Camera/etc.) provided by this instance. | |
Protected Attributes | |
Vector2i | m_outputSize |
ReconstructionFilter * | m_rfilter |
Generic camera interface.
This class provides an abstract interface to cameras in Nori and exposes the ability to sample their response function. By default, only a perspective camera implementation exists, but you may choose to implement other types (e.g. an environment camera, or a physically-based camera model that simulates the behavior actual lenses)
EClassType Camera::getClassType | ( | ) | const [inline, virtual] |
Return the type of object (i.e. Mesh/Camera/etc.) provided by this instance.
Implements NoriObject.
const Vector2i& Camera::getOutputSize | ( | ) | const [inline] |
const ReconstructionFilter* Camera::getReconstructionFilter | ( | ) | const [inline] |
virtual Color3f Camera::sampleRay | ( | Ray3f & | ray, |
const Point2f & | samplePosition, | ||
const Point2f & | apertureSample | ||
) | const [pure virtual] |
Importance sample a ray according to the camera's response function.
ray | A ray data structure to be filled with a position and direction value |
samplePosition | Denotes the desired sample position on the film expressed in fractional pixel coordinates |
apertureSample | A uniformly distributed 2D vector that is used to sample a position on the aperture of the sensor if necessary. |
Vector2i Camera::m_outputSize [protected] |
ReconstructionFilter* Camera::m_rfilter [protected] |