Photon Engine 2.0.0-beta
A physically based renderer.
Loading...
Searching...
No Matches
RectangularSensorReceiver.h
Go to the documentation of this file.
1#pragma once
2
4#include "Math/TVector2.h"
5
6#include <Common/assertion.h>
7
8namespace ph::math { class Transform; }
9namespace ph::math { class RigidTransform; }
10
11namespace ph
12{
13
14class Ray;
15
19{
20public:
27 const math::Vector2D& sensorSize,
28 const math::Transform* rasterToSensor,
29 const math::RigidTransform* receiverToWorld);
30
31 math::Spectrum receiveRay(const math::Vector2D& rasterCoord, Ray* out_ray) const override = 0;
32
34 const math::Vector3R& targetPos,
35 math::Vector2R* const out_filmCoord,
36 math::Vector3R* const out_importance,
37 real* out_filmArea,
38 real* const out_pdfW) const override = 0;
39
40 const math::Vector2D& getSensorSize() const;
42
43private:
44 math::Vector2D m_sensorSize;
45 const math::Transform* m_rasterToSensor;
46};
47
48// In-header Implementations:
49
51{
52 return m_sensorSize;
53}
54
56{
57 PH_ASSERT(m_rasterToSensor);
58
59 return *m_rasterToSensor;
60}
61
62}// end namespace ph
Represents a ray in space.
Definition Ray.h:21
A target that can receive any physical quantity, typically electromagnetic energy....
Definition Receiver.h:22
A receiver with a rectangular sensor installed.
Definition RectangularSensorReceiver.h:19
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=0
const math::Vector2D & getSensorSize() const
Definition RectangularSensorReceiver.h:50
math::Spectrum receiveRay(const math::Vector2D &rasterCoord, Ray *out_ray) const override=0
Generate a ray received by the receiver.
RectangularSensorReceiver(const math::Vector2D &sensorSize, const math::Transform *rasterToSensor, const math::RigidTransform *receiverToWorld)
Definition RectangularSensorReceiver.cpp:6
const math::Transform & getRasterToSensor() const
Definition RectangularSensorReceiver.h:55
Definition RigidTransform.h:14
Definition TTristimulusSpectrum.h:11
Definition Transform.h:21
Math functions and utilities.
Definition TransformInfo.h:10
The root for all renderer implementations.
Definition EEngineProject.h:6