LibCarna Version 3.4.0
Loading...
Searching...
No Matches
OccludedRenderingStage.hpp
Go to the documentation of this file.
1/*
2 * Copyright (C) 2010 - 2016 Leonid Kostrykin
3 *
4 * Chair of Medical Engineering (mediTEC)
5 * RWTH Aachen University
6 * Pauwelsstr. 20
7 * 52074 Aachen
8 * Germany
9 *
10 *
11 * Copyright (C) 2021 - 2025 Leonid Kostrykin
12 *
13 */
14
15#ifndef OCCLUDEDRENDERINGSTAGE_H_6014714286
16#define OCCLUDEDRENDERINGSTAGE_H_6014714286
17
19
25namespace LibCarna
26{
27
28namespace presets
29{
30
31
32
33// ----------------------------------------------------------------------------------
34// OccludedRenderingStage
35// ----------------------------------------------------------------------------------
36
60{
61
62 struct Details;
63 const std::unique_ptr< Details > pimpl;
64
65 struct VideoResources;
66 std::unique_ptr< VideoResources > vr;
67
68public:
69
74
80
85
90
94 void enableStage( const base::RenderStage& rs );
95
100
104 bool isStageEnabled( const base::RenderStage& rs ) const;
105
112 void setOcclusionTranslucency( float translucency );
113
121
122 virtual void reshape( base::FrameRenderer& fr, unsigned int width, unsigned int height ) override;
123
124 virtual void prepareFrame( base::Node& root ) override;
125
126 virtual void renderPass
127 ( const base::math::Matrix4f& viewTransform
128 , base::RenderTask& rt
129 , const base::Viewport& vp ) override;
130
131}; // OccludedRenderingStage
132
133
134
135} // namespace LibCarna :: presets
136
137} // namespace LibCarna
138
139#endif // OCCLUDEDRENDERINGSTAGE_H_6014714286
Defines LibCarna::base::RenderStage.
Defines logic for rendering frames from given scenes.
Defines the inner node of a scene graph. Implements a spatial scene element that is allowed to have c...
Definition Node.hpp:48
Base abstract class of each rendering stage. Refer to the documentation of the rendering process.
Invokes the rendering stages of the frame renderer successively.
Defines a rendering viewport. The viewport is a property of the current OpenGL context.
Definition Viewport.hpp:52
Renders geometry that is actually depth-occluded. The occluded geometry is rendered with reduced opac...
virtual void reshape(base::FrameRenderer &fr, unsigned int width, unsigned int height) override
Orders this stage to reshape its buffers according to the specified width and height.
float occlusionTranslucency() const
Tells the translucency of the occluding geometry.
void enableStage(const base::RenderStage &rs)
Enables rs in .
static const float DEFAULT_OCCLUSION_TRANSLUCENCY
Holds the default translucency of the occluding geometry.
bool isStageEnabled(const base::RenderStage &rs) const
Tells whether rs is enabled in .
OccludedRenderingStage()
Sets translucency of occluding geometry to DEFAULT_OCCLUSION_TRANSLUCENCY.
void disableStage(const base::RenderStage &rs)
Disables rs in .
virtual void prepareFrame(base::Node &root) override
Called once before each frame.
void disableAllStages()
Disables all stages.
void setOcclusionTranslucency(float translucency)
Sets the translucency of the occluding geometry.
virtual void renderPass(const base::math::Matrix4f &viewTransform, base::RenderTask &rt, const base::Viewport &vp) override
Called once per pass.
Eigen::Matrix< float, 4, 4, Eigen::ColMajor > Matrix4f
Defines matrix.
Definition math.hpp:197