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. More... | |
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. | |
virtual EClassType | getClassType () const override |
Return the type of object (i.e. Mesh/Camera/etc.) provided by this instance. | |
Public Member Functions inherited from NoriObject | |
virtual | ~NoriObject () |
Virtual destructor. | |
virtual void | addChild (NoriObject *child) |
Add a child object to the current instance. More... | |
virtual void | setParent (NoriObject *parent) |
Set the parent object. More... | |
virtual void | activate () |
Perform some action associated with the object. More... | |
virtual std::string | toString () const =0 |
Return a brief string summary of the instance (for debugging purposes) | |
void | setIdName (const std::string &name) |
Allow to assign a name to the object. | |
const std::string & | getIdName () const |
Protected Attributes | |
Vector2i | m_outputSize |
ReconstructionFilter * | m_rfilter |
Protected Attributes inherited from NoriObject | |
std::string | m_idname |
Additional Inherited Members | |
Public Types inherited from NoriObject | |
enum | EClassType { EScene = 0 , EMesh , ETexture , EBSDF , EPhaseFunction , EEmitter , EMedium , ECamera , EIntegrator , ESampler , ETest , EReconstructionFilter , EClassTypeCount } |
Static Public Member Functions inherited from NoriObject | |
static std::string | classTypeName (EClassType type) |
Turn a class type into a human-readable string. | |
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)
|
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. |
Implemented in PerspectiveCamera.