Carna  Version 3.3.2
Public Member Functions | List of all members
Carna::base::RenderStage Class Referenceabstract

Base abstract class of each rendering stage. Refer to the documentation of the rendering process. More...

#include <RenderStage.h>

+ Inheritance diagram for Carna::base::RenderStage:

Public Member Functions

 RenderStage ()
 Instantiates in enabled-state.
 
virtual ~RenderStage ()
 Deletes.
 
virtual RenderStageclone () const =0
 Returns same RenderStage implementation with same configuration. More...
 
void setViewTransformFixed (bool viewTransformFixed)
 Sets whether the view transform is pass-invariant for the duration of a single frame. More...
 
bool isViewTransformFixed () const
 Tells whether the view transform is pass-invariant for the duration of a single frame.
 
virtual void reshape (FrameRenderer &fr, unsigned int width, unsigned int height)
 Orders this stage to reshape its buffers according to the specified dimensions. More...
 
bool isInitialized () const
 Tells whether this stage is ready for rendering. More...
 
virtual void prepareFrame (Node &root)
 Called once before each frame.
 
virtual void renderPass (const math::Matrix4f &viewTransform, RenderTask &rt, const Viewport &vp)=0
 Called once per pass. More...
 
bool isEnabled () const
 Tells whether this stage is enabled. Disabled stages are not rendered by render tasks.
 
void setEnabled (bool)
 Sets whether this stage is enabled. Disabled stages are not rendered by render tasks.
 
base::FrameRendererrenderer ()
 References the renderer this stage belongs to. More...
 
const base::FrameRendererrenderer () const
 
void addRenderStageListener (RenderStageListener &listener)
 Adds listener to the set of listeners this instance notifies in \(\mathcal O\left(\log n\right)\).
 
void removeRenderStageListener (RenderStageListener &listener)
 Removes listener from the set of listeners this instance notifies in \(\mathcal O\left(\log n\right)\).
 

Detailed Description

Base abstract class of each rendering stage. Refer to the documentation of the rendering process.

Author
Leonid Kostrykin
Date
21.2.15 - 17.3.15

Definition at line 42 of file RenderStage.h.

Member Function Documentation

◆ clone()

virtual RenderStage* Carna::base::RenderStage::clone ( ) const
pure virtual

◆ isInitialized()

bool Carna::base::RenderStage::isInitialized ( ) const

Tells whether this stage is ready for rendering.

In particular, this method returns true if this rendering stage only requires reshape to be called, if the dimensions actually have changed. In contrary, i.e. if this method returns false, reshape will be called before every frame.

◆ renderer() [1/2]

base::FrameRenderer& Carna::base::RenderStage::renderer ( )

References the renderer this stage belongs to.

Precondition
isInitialized() == true

◆ renderer() [2/2]

const base::FrameRenderer& Carna::base::RenderStage::renderer ( ) const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ renderPass()

virtual void Carna::base::RenderStage::renderPass ( const math::Matrix4f viewTransform,
RenderTask rt,
const Viewport vp 
)
pure virtual

◆ reshape()

virtual void Carna::base::RenderStage::reshape ( FrameRenderer fr,
unsigned int  width,
unsigned int  height 
)
virtual

Orders this stage to reshape its buffers according to the specified dimensions.

Attention
Always call the base implementaion!
Parameters
frreferences the frame renderer this stage belongs to.
widthis the root viewport width.
heightis the root viewport height.

Reimplemented in Carna::presets::DVRStage, Carna::presets::DRRStage, Carna::presets::MeshColorCodingStage, Carna::presets::OccludedRenderingStage, Carna::presets::CompositionStage, Carna::presets::MaskRenderingStage, and Carna::presets::MIPStage.

◆ setViewTransformFixed()

void Carna::base::RenderStage::setViewTransformFixed ( bool  viewTransformFixed)

Sets whether the view transform is pass-invariant for the duration of a single frame.

Note
This method is for internal usage only.

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