Perspective camera with depth of field. More...
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 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 | 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 |
ReconstructionFilter * | m_rfilter |
Protected Attributes inherited from NoriObject | |
std::string | m_idname |
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.
|
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.
|
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.
|
inlinevirtual |
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. |
Implements Camera.
Definition at line 90 of file perspective.cpp.