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

#include <PMRendererBase.h>

Inheritance diagram for ph::PMRendererBase:
ph::Renderer ph::ProbabilisticProgressivePMRenderer ph::ProgressivePMRenderer ph::StochasticProgressivePMRenderer ph::VanillaPMRenderer

Public Member Functions

 PMRendererBase (PMCommonParams commonParams, Viewport viewport, SampleFilter filter, uint32 numWorkers)
 
void doRender () override=0
 Perform rendering.
 
void retrieveFrame (std::size_t layerIndex, HdrRgbFrame &out_frame) override=0
 Get the rendered result.
 
RenderStats asyncQueryRenderStats () override=0
 Get general information of the ongoing rendering process. More information can be provided by the implementation. The meaning of each stat can be obtained via getObservationInfo().
 
RenderProgress asyncQueryRenderProgress () override=0
 Get progress of the ongoing rendering process. Implementation is advised to provide this information as it is vital for the caller to be able to observe the progress of a potentially long-running rendering process.
 
void asyncPeekFrame (std::size_t layerIndex, const Region &region, HdrRgbFrame &out_frame) override=0
 Get the intermediate render result. This method is similar to retrieveFrame(), except that correctness is not guaranteed for the returned frame.
 
RenderObservationInfo getObservationInfo () const =0
 Get information about available transient outputs of an ongoing render operation. This information will be determined after each update (constant throughout the following rendering process). The actual data and can be retrieved via async<X>() methods.
 
void doUpdate (const CoreCookedUnit &cooked, const VisualWorld &world) override
 Gather cooked data. Perform any required initialization before render.
 
std::size_t asyncPollUpdatedRegions (TSpan< RenderRegionStatus > out_regions) override
 Get updated regions based on the state of primary film.
 
const SampleFiltergetFilter () const
 
const PMCommonParamsgetCommonParams () const
 
const ScenegetScene () const
 
const ReceivergetReceiver () const
 
const SampleGeneratorgetSampleGenerator () const
 
TSynchronized< HdrRgbFilm > & getPrimaryFilm ()
 
PMAtomicStatisticsgetStatistics ()
 
void asyncDevelopPrimaryFilm (const Region &region, HdrRgbFrame &out_frame)
 
void asyncMergeToPrimaryFilm (const HdrRgbFilm &srcFilm)
 
void asyncReplacePrimaryFilm (const HdrRgbFilm &srcFilm)
 
- Public Member Functions inherited from ph::Renderer
 Renderer (Viewport viewport, uint32 numWorkers)
 
virtual ~Renderer ()
 
void update (const CoreCookedUnit &cooked, const VisualWorld &world)
 Start updating.
 
void render ()
 Start rendering.
 
void setNumWorkers (uint32 numWorkers)
 Set number of workers for the renderer.
 
uint32 numWorkers () const
 
uint32 getRenderWidthPx () const
 
uint32 getRenderHeightPx () const
 
math::TAABB2D< int64 > getCropWindowPx () const
 The region to work on. The user may specify a window to confine all operations to this region. Note that this is not necessary the region that will be rendered (see getRenderRegionPx()).
 
math::TAABB2D< int64 > getRenderRegionPx () const
 The region that is going to be rendered. The difference between render region and crop window is that render region will never exceed the area defined by the base render size ([0, 0] to [getRenderWidthPx(), getRenderHeightPx()]).
 
const ViewportgetViewport () const
 Descriptions regarding dimensions for the rendered frame. Viewport is set on ctor and stayed constant during the lifetime of the renderer.
 
bool asyncIsUpdating () const
 
bool asyncIsRendering () const
 
std::size_t asyncPollMergedUpdatedRegions (TSpan< RenderRegionStatus > out_regions, std::size_t mergeSize)
 Get the rendering region that has been updated. This variant polls for combined regions. Note that this variant does not guarantee any status ordering for a region. If a more fine-grained result is desired, use asyncPollUpdatedRegions().
 

Constructor & Destructor Documentation

◆ PMRendererBase()

ph::PMRendererBase::PMRendererBase ( PMCommonParams commonParams,
Viewport viewport,
SampleFilter filter,
uint32 numWorkers )

Member Function Documentation

◆ asyncDevelopPrimaryFilm()

void ph::PMRendererBase::asyncDevelopPrimaryFilm ( const Region & region,
HdrRgbFrame & out_frame )

◆ asyncMergeToPrimaryFilm()

void ph::PMRendererBase::asyncMergeToPrimaryFilm ( const HdrRgbFilm & srcFilm)

◆ asyncPeekFrame()

void ph::PMRendererBase::asyncPeekFrame ( std::size_t layerIndex,
const Region & region,
HdrRgbFrame & out_frame )
overridepure virtual

Get the intermediate render result. This method is similar to retrieveFrame(), except that correctness is not guaranteed for the returned frame.

Implements ph::Renderer.

Implemented in ph::ProbabilisticProgressivePMRenderer, ph::ProgressivePMRenderer, ph::StochasticProgressivePMRenderer, and ph::VanillaPMRenderer.

◆ asyncPollUpdatedRegions()

std::size_t ph::PMRendererBase::asyncPollUpdatedRegions ( TSpan< RenderRegionStatus > out_regions)
overridevirtual

Get updated regions based on the state of primary film.

Implements ph::Renderer.

◆ asyncQueryRenderProgress()

RenderProgress ph::PMRendererBase::asyncQueryRenderProgress ( )
overridepure virtual

Get progress of the ongoing rendering process. Implementation is advised to provide this information as it is vital for the caller to be able to observe the progress of a potentially long-running rendering process.

Implements ph::Renderer.

Implemented in ph::ProbabilisticProgressivePMRenderer, ph::ProgressivePMRenderer, ph::StochasticProgressivePMRenderer, and ph::VanillaPMRenderer.

◆ asyncQueryRenderStats()

RenderStats ph::PMRendererBase::asyncQueryRenderStats ( )
overridepure virtual

Get general information of the ongoing rendering process. More information can be provided by the implementation. The meaning of each stat can be obtained via getObservationInfo().

Implements ph::Renderer.

Implemented in ph::ProbabilisticProgressivePMRenderer, ph::ProgressivePMRenderer, ph::StochasticProgressivePMRenderer, and ph::VanillaPMRenderer.

◆ asyncReplacePrimaryFilm()

void ph::PMRendererBase::asyncReplacePrimaryFilm ( const HdrRgbFilm & srcFilm)

◆ doRender()

void ph::PMRendererBase::doRender ( )
overridepure virtual

◆ doUpdate()

void ph::PMRendererBase::doUpdate ( const CoreCookedUnit & cooked,
const VisualWorld & world )
overridevirtual

Gather cooked data. Perform any required initialization before render.

Implements ph::Renderer.

◆ getCommonParams()

const PMCommonParams & ph::PMRendererBase::getCommonParams ( ) const
inline

◆ getFilter()

const SampleFilter & ph::PMRendererBase::getFilter ( ) const
inline

◆ getObservationInfo()

RenderObservationInfo ph::PMRendererBase::getObservationInfo ( ) const
pure virtual

Get information about available transient outputs of an ongoing render operation. This information will be determined after each update (constant throughout the following rendering process). The actual data and can be retrieved via async<X>() methods.

Implements ph::Renderer.

Implemented in ph::ProbabilisticProgressivePMRenderer, ph::ProgressivePMRenderer, ph::StochasticProgressivePMRenderer, and ph::VanillaPMRenderer.

◆ getPrimaryFilm()

TSynchronized< HdrRgbFilm > & ph::PMRendererBase::getPrimaryFilm ( )
inline

◆ getReceiver()

const Receiver * ph::PMRendererBase::getReceiver ( ) const
inline

◆ getSampleGenerator()

const SampleGenerator * ph::PMRendererBase::getSampleGenerator ( ) const
inline

◆ getScene()

const Scene * ph::PMRendererBase::getScene ( ) const
inline

◆ getStatistics()

PMAtomicStatistics & ph::PMRendererBase::getStatistics ( )
inline

◆ retrieveFrame()

void ph::PMRendererBase::retrieveFrame ( std::size_t layerIndex,
HdrRgbFrame & out_frame )
overridepure virtual

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