Carna  Version 3.3.2
OccludedRenderingStage.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2010 - 2015 Leonid Kostrykin
3  *
4  * Chair of Medical Engineering (mediTEC)
5  * RWTH Aachen University
6  * Pauwelsstr. 20
7  * 52074 Aachen
8  * Germany
9  *
10  */
11 
12 #ifndef OCCLUDEDRENDERINGSTAGE_H_6014714286
13 #define OCCLUDEDRENDERINGSTAGE_H_6014714286
14 
15 #include <Carna/base/RenderStage.h>
16 
21 namespace Carna
22 {
23 
24 namespace presets
25 {
26 
27 
28 
29 // ----------------------------------------------------------------------------------
30 // OccludedRenderingStage
31 // ----------------------------------------------------------------------------------
32 
56 class CARNA_LIB OccludedRenderingStage : public base::RenderStage
57 {
58 
59  struct Details;
60  const std::unique_ptr< Details > pimpl;
61 
62  struct VideoResources;
63  std::unique_ptr< VideoResources > vr;
64 
65 public:
66 
70  const static float DEFAULT_OCCLUSION_TRANSLUCENCY;
71 
77 
78  OccludedRenderingStage* clone() const override;
79 
83  virtual ~OccludedRenderingStage();
84 
88  void disableAllStages();
89 
93  void enableStage( const base::RenderStage& rs );
94 
98  void disableStage( const base::RenderStage& rs );
99 
103  bool isStageEnabled( const base::RenderStage& rs ) const;
104 
111  void setOcclusionTranslucency( float translucency );
112 
119  float occlusionTranslucency() const;
120 
121  virtual void reshape( base::FrameRenderer& fr, unsigned int width, unsigned int height ) override;
122 
123  virtual void prepareFrame( base::Node& root ) override;
124 
125  virtual void renderPass
126  ( const base::math::Matrix4f& viewTransform
127  , base::RenderTask& rt
128  , const base::Viewport& vp ) override;
129 
130 }; // OccludedRenderingStage
131 
132 
133 
134 } // namespace Carna :: presets
135 
136 } // namespace Carna
137 
138 #endif // OCCLUDEDRENDERINGSTAGE_H_6014714286
Defines logic for rendering frames from given scenes.
Definition: FrameRenderer.h:69
Defines the inner node of a scene graph. Implements a spatial scene element that is allowed to have c...
Definition: Node.h:44
Invokes the rendering stages of the frame renderer successively.
Definition: RenderTask.h:40
Renders geometry that is actually depth-occluded. The occluded geometry is rendered with reduced opac...
Eigen::Matrix< float, 4, 4, Eigen::ColMajor > Matrix4f
Defines matrix.
Definition: math.h:193
Base abstract class of each rendering stage. Refer to the documentation of the rendering process...
Definition: RenderStage.h:42
Defines a rendering viewport. The viewport is a property of the current OpenGL context.
Definition: Viewport.h:48
static const float DEFAULT_OCCLUSION_TRANSLUCENCY
Holds the default translucency of the occluding geometry.
Defines Carna::base::RenderStage.