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

A film that records 3-D vectors. More...

#include <Vector3Film.h>

Inheritance diagram for ph::Vector3Film:
ph::TSamplingFilm< math::Vector3R > ph::Film ph::IMoveOnly

Public Member Functions

 Vector3Film (int64 actualWidthPx, int64 actualHeightPx, const SampleFilter &filter)
 
 Vector3Film (int64 actualWidthPx, int64 actualHeightPx, const math::TAABB2D< int64 > &effectiveWindowPx, const SampleFilter &filter)
 
void addSample (float64 xPx, float64 yPx, const math::Vector3R &sample) override
 Applies filter to sample value and add to the film. Generally, this method can produce higher quality result by reconstruct the image function with a filter.
 
void setPixel (float64 xPx, float64 yPx, const math::Vector3R &sample) override
 Let the pixel developes to the specified sample value. An interface for using the film as an ordinary image. This method may disturb sample weights. Using this method with addSample() may result in image artifacts unless the implementation says otherwise.
 
void clear () override
 Set all pixel data to its initial state.
 
void setEffectiveWindowPx (const math::TAABB2D< int64 > &effectiveWindow) override
 Set the region where the film will be used. Implementation is advised to take advantage of this and only allocate memory for the part within the effective window.
 
- Public Member Functions inherited from ph::TSamplingFilm< math::Vector3R >
 TSamplingFilm ()=default
 
 TSamplingFilm (int64 actualWidthPx, int64 actualHeightPx, const SampleFilter &filter)
 
 TSamplingFilm (int64 actualWidthPx, int64 actualHeightPx, const math::TAABB2D< int64 > &effectiveWindowPx, const SampleFilter &filter)
 
void setSoftEdge (bool useSoftEdge, float32 softness=1.0f)
 Whether to increase the sampling window converage for prettier boundaries in developed frame. In renderings where the image is divided into tiles and sampled independently, the resulting image may have visible artifacts along tile boundaries. This can be alleviated by increasing the size of each tile, so edge pixels can receive more information, reducing their variance. This costs slightly more memory, and tiles will have overlapping sampling regions (may need more care for concurrency).
 
math::TVector2< float64 > getSampleResPx () const
 
const math::TAABB2D< float64 > & getSampleWindowPx () const
 
const SampleFiltergetFilter () const
 
SamplingFilmDimensions getDimensions () const
 
bool isSoftEdged () const
 
- Public Member Functions inherited from ph::Film
 Film ()
 
 Film (int64 actualWidthPx, int64 actualHeightPx)
 
 Film (int64 actualWidthPx, int64 actualHeightPx, const math::TAABB2D< int64 > &effectiveWindowPx)
 
 Film (Film &&other)=default
 
Filmoperator= (Film &&other)=default
 
virtual ~Film ()=default
 
virtual void setActualResPx (const math::TVector2< int64 > &actualResPx)
 Set the apparent size of the film. If only a sub-region of the film is going to be used, set the effective window accordingly may improve performance especially in memory usage.
 
void develop (HdrRgbFrame &out_frame) const
 
void develop (HdrRgbFrame &out_frame, const math::TAABB2D< int64 > &regionPx) const
 
const math::TVector2< int64 > & getActualResPx () const
 
math::TVector2< int64 > getEffectiveResPx () const
 
const math::TAABB2D< int64 > & getEffectiveWindowPx () const
 

Detailed Description

A film that records 3-D vectors.

Constructor & Destructor Documentation

◆ Vector3Film() [1/2]

ph::Vector3Film::Vector3Film ( int64 actualWidthPx,
int64 actualHeightPx,
const SampleFilter & filter )
inline

◆ Vector3Film() [2/2]

ph::Vector3Film::Vector3Film ( int64 actualWidthPx,
int64 actualHeightPx,
const math::TAABB2D< int64 > & effectiveWindowPx,
const SampleFilter & filter )
inline

Member Function Documentation

◆ addSample()

void ph::Vector3Film::addSample ( float64 xPx,
float64 yPx,
const math::Vector3R & sample )
inlineoverridevirtual

Applies filter to sample value and add to the film. Generally, this method can produce higher quality result by reconstruct the image function with a filter.

Parameters
xPxThe x coordinate in raster space.
yPxThe y coordinate in raster space.
sampleThe value to add as a sample.

Implements ph::TSamplingFilm< math::Vector3R >.

◆ clear()

void ph::Vector3Film::clear ( )
inlineoverridevirtual

Set all pixel data to its initial state.

Implements ph::TSamplingFilm< math::Vector3R >.

◆ setEffectiveWindowPx()

void ph::Vector3Film::setEffectiveWindowPx ( const math::TAABB2D< int64 > & effectiveWindow)
inlineoverridevirtual

Set the region where the film will be used. Implementation is advised to take advantage of this and only allocate memory for the part within the effective window.

Reimplemented from ph::TSamplingFilm< math::Vector3R >.

◆ setPixel()

void ph::Vector3Film::setPixel ( float64 xPx,
float64 yPx,
const math::Vector3R & sample )
inlineoverridevirtual

Let the pixel developes to the specified sample value. An interface for using the film as an ordinary image. This method may disturb sample weights. Using this method with addSample() may result in image artifacts unless the implementation says otherwise.

Parameters
xPxThe x coordinate in raster space.
yPxThe y coordinate in raster space.
sampleThe value the pixel will develop to.

Implements ph::TSamplingFilm< math::Vector3R >.


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