Photon Engine 2.0.0-beta
A physically based renderer.
Loading...
Searching...
No Matches
ph::PinholeCamera Class Reference

#include <PinholeCamera.h>

Inheritance diagram for ph::PinholeCamera:
ph::RectangularSensorReceiver ph::Receiver

Public Member Functions

 PinholeCamera (const math::Vector2D &sensorSize, const math::Transform *rasterToSensor, const math::RigidTransform *cameraToWorld)
 
math::Spectrum receiveRay (const math::Vector2D &rasterCoord, Ray *out_ray) const override
 Generate a ray received by the receiver.
 
void evalEmittedImportanceAndPdfW (const math::Vector3R &targetPos, math::Vector2R *const out_filmCoord, math::Vector3R *const out_importance, real *out_filmArea, real *const out_pdfW) const override
 
const math::RigidTransformgetCameraToWorld () const
 
- Public Member Functions inherited from ph::RectangularSensorReceiver
 RectangularSensorReceiver (const math::Vector2D &sensorSize, const math::Transform *rasterToSensor, const math::RigidTransform *receiverToWorld)
 
const math::Vector2DgetSensorSize () const
 
const math::TransformgetRasterToSensor () const
 
- Public Member Functions inherited from ph::Receiver
 Receiver (const math::RigidTransform *receiverToWorld)
 
virtual ~Receiver ()=default
 
const math::RigidTransformgetReceiverToWorld () const
 

Constructor & Destructor Documentation

◆ PinholeCamera()

ph::PinholeCamera::PinholeCamera ( const math::Vector2D & sensorSize,
const math::Transform * rasterToSensor,
const math::RigidTransform * cameraToWorld )
Parameters
sensorSizeSize of the installed sensor.
rasterToSensorTransform from raster to sensor position (in camera space).
receiverToWorldTransform from camera to world space.

Member Function Documentation

◆ evalEmittedImportanceAndPdfW()

void ph::PinholeCamera::evalEmittedImportanceAndPdfW ( const math::Vector3R & targetPos,
math::Vector2R *const out_filmCoord,
math::Vector3R *const out_importance,
real * out_filmArea,
real *const out_pdfW ) const
overridevirtual

◆ getCameraToWorld()

const math::RigidTransform & ph::PinholeCamera::getCameraToWorld ( ) const
inline

◆ receiveRay()

math::Spectrum ph::PinholeCamera::receiveRay ( const math::Vector2D & rasterCoord,
Ray * out_ray ) const
overridevirtual

Generate a ray received by the receiver.

Given raster coordinates, generate a corresponding ray that would have hit that location from the light entry of the receiver. The light entry would be the outmost surface of a camera's lens system for example. This method is for Monte-Carlo sampling.

Returns
A weighting factor for the received quantity. Proper sensor response and sampling PDF are included in the returned weight.

Implements ph::RectangularSensorReceiver.


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