Nori  24
PerspectiveCamera Class Reference

Perspective camera with depth of field. More...

Inheritance diagram for PerspectiveCamera:
Collaboration diagram for PerspectiveCamera:

Public Member Functions

 PerspectiveCamera (const PropertyList &propList)
 
virtual void activate () override
 Perform some action associated with the object. More...
 
Color3f sampleRay (Ray3f &ray, const Point2f &samplePosition, const Point2f &apertureSample) const
 Importance sample a ray according to the camera's response function. More...
 
virtual void addChild (NoriObject *obj) override
 Add a child object to the current instance. More...
 
virtual std::string toString () const override
 Return a human-readable summary.
 
- Public Member Functions inherited from Camera
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 setParent (NoriObject *parent)
 Set the parent object. More...
 
void setIdName (const std::string &name)
 Allow to assign a name to the object.
 
const std::string & getIdName () const
 

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.
 
- Protected Attributes inherited from Camera
Vector2i m_outputSize
 
ReconstructionFilterm_rfilter
 
- Protected Attributes inherited from NoriObject
std::string m_idname
 

Detailed Description

Perspective camera with depth of field.

This class implements a simple perspective camera model. It uses an infinitesimally small aperture, creating an infinite depth of field.

Definition at line 32 of file perspective.cpp.

Member Function Documentation

◆ activate()

virtual void PerspectiveCamera::activate ( )
inlineoverridevirtual

Perform some action associated with the object.

The default implementation throws an exception. Certain objects may choose to override it, e.g. to implement initialization, testing, or rendering functionality.

This function is called by the XML parser once it has constructed an object and added all of its children using addChild().

Translation and scaling to shift the clip coordinates into the range from zero to one. Also takes the aspect ratio into account.

Reimplemented from NoriObject.

Definition at line 53 of file perspective.cpp.

◆ addChild()

virtual void PerspectiveCamera::addChild ( NoriObject child)
inlineoverridevirtual

Add a child object to the current instance.

The default implementation does not support children and simply throws an exception

Reimplemented from NoriObject.

Definition at line 113 of file perspective.cpp.

◆ sampleRay()

Color3f PerspectiveCamera::sampleRay ( Ray3f ray,
const Point2f samplePosition,
const Point2f apertureSample 
) const
inlinevirtual

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.

Implements Camera.

Definition at line 90 of file perspective.cpp.


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