LibCarna Version 3.4.0
Loading...
Searching...
No Matches
Public Member Functions | List of all members
LibCarna::base::RenderStage Class Referenceabstract

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

#include <RenderStage.hpp>

+ Inheritance diagram for LibCarna::base::RenderStage:

Public Member Functions

 RenderStage ()
 Instantiates in enabled-state.
 
virtual ~RenderStage ()
 Deletes.
 
void setViewTransformFixed (bool viewTransformFixed)
 Sets whether the view transform is pass-invariant for the duration of a single frame.
 
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 width and height.
 
bool isInitialized () const
 Tells whether this stage is ready for rendering.
 
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.
 
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.
 
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

Definition at line 45 of file RenderStage.hpp.

Member Function Documentation

◆ isInitialized()

bool LibCarna::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 width or height actually have changed. In contrary, i.e. if this method returns false, reshape will be called before every frame.

◆ prepareFrame()

virtual void LibCarna::base::RenderStage::prepareFrame ( Node root)
virtual

◆ renderer() [1/2]

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

References the renderer this stage belongs to.

Precondition
isInitialized() == true

◆ renderer() [2/2]

const base::FrameRenderer & LibCarna::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 LibCarna::base::RenderStage::renderPass ( const math::Matrix4f viewTransform,
RenderTask rt,
const Viewport vp 
)
pure virtual

◆ reshape()

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

Orders this stage to reshape its buffers according to the specified width and height.

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 LibCarna::presets::CompositionStage, LibCarna::presets::DRRStage, LibCarna::presets::DVRStage, LibCarna::presets::MaskRenderingStage, LibCarna::presets::MeshColorCodingStage, LibCarna::presets::MIPStage, and LibCarna::presets::OccludedRenderingStage.

◆ setViewTransformFixed()

void LibCarna::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: