Nori  23
Camera Class Referenceabstract

Generic camera interface. More...

#include <camera.h>

Inheritance diagram for Camera:
Collaboration diagram for Camera:

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 Vector2igetOutputSize () const
 Return the size of the output image in pixels.
 
const ReconstructionFiltergetReconstructionFilter () 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
 
ReconstructionFilterm_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.
 

Detailed Description

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)

Definition at line 35 of file camera.h.

Member Function Documentation

◆ sampleRay()

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.

Parameters
rayA ray data structure to be filled with a position and direction value
samplePositionDenotes the desired sample position on the film expressed in fractional pixel coordinates
apertureSampleA uniformly distributed 2D vector that is used to sample a position on the aperture of the sensor if necessary.
Returns
An importance weight associated with the sampled ray. This accounts for the difference in the camera response function and the sampling density.

Implemented in PerspectiveCamera.


The documentation for this class was generated from the following file: