Carna  Version 3.3.2
RenderStage.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 RENDERSTAGE_H_6014714286
13 #define RENDERSTAGE_H_6014714286
14 
15 #include <Carna/Carna.h>
16 #include <Carna/base/noncopyable.h>
17 #include <Carna/base/math.h>
18 
23 namespace Carna
24 {
25 
26 namespace base
27 {
28 
29 
30 
31 // ----------------------------------------------------------------------------------
32 // RenderStage
33 // ----------------------------------------------------------------------------------
34 
42 class CARNA_LIB RenderStage
43 {
44 
46 
47  struct Details;
48  const std::unique_ptr< Details > pimpl;
49 
50 public:
51 
55  RenderStage();
56 
60  virtual ~RenderStage();
61 
69  virtual RenderStage* clone() const = 0;
70 
78  void setViewTransformFixed( bool viewTransformFixed );
79 
84  bool isViewTransformFixed() const;
85 
97  virtual void reshape( FrameRenderer& fr, unsigned int width, unsigned int height );
98 
107  bool isInitialized() const;
108 
112  virtual void prepareFrame( Node& root );
113 
126  virtual void renderPass( const math::Matrix4f& viewTransform, RenderTask& rt, const Viewport& vp ) = 0;
127 
132  bool isEnabled() const;
133 
138  void setEnabled( bool );
139 
144  base::FrameRenderer& renderer();
145 
148  const base::FrameRenderer& renderer() const;
149 
154  void addRenderStageListener( RenderStageListener& listener );
155 
160  void removeRenderStageListener( RenderStageListener& listener );
161 
162 }; // RenderStage
163 
164 
165 
166 } // namespace Carna :: base
167 
168 } // namespace Carna
169 
170 #endif // RENDERSTAGE_H_6014714286
Defines Carna::base::math namespace and CARNA_FOR_VECTOR3UI.
Defines callbacks for RenderStage lifetime events.
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
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
#define NON_COPYABLE
Features class it is placed in as non-copyable.
Definition: noncopyable.h:109