Carna  Version 3.3.2
ParallaxStage.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 PARALLAXSTAGE_H_6014714286
13 #define PARALLAXSTAGE_H_6014714286
14 
16 
21 namespace Carna
22 {
23 
24 namespace presets
25 {
26 
27 
28 
29 // ----------------------------------------------------------------------------------
30 // ParallaxStage
31 // ----------------------------------------------------------------------------------
32 
62 class CARNA_LIB ParallaxStage : public CompositionStage
63 {
64 
65  struct Details;
66  const std::unique_ptr< Details > pimpl;
67 
68 public:
69 
73  const static float DEFAULT_EYE_DISTANCE;
74 
78  explicit ParallaxStage( CompositionMode compositionMode );
79 
80  ParallaxStage* clone() const override;
81 
85  virtual ~ParallaxStage();
86 
90  void setEyeDistance( float );
91 
95  float eyeDistance() const;
96 
97 protected:
98 
99  virtual void renderPass
100  ( const base::math::Matrix4f& viewTransform
101  , base::RenderTask& rt
102  , const base::Viewport& vp
103  , bool isFirstInvocation
104  , bool isFirstSource ) override;
105 
106 }; // ParallaxStage
107 
108 
109 
110 } // namespace Carna :: presets
111 
112 } // namespace Carna
113 
114 #endif // PARALLAXSTAGE_H_6014714286
Defines rendering stage that combines two other renderings either by putting them next to each other ...
CompositionMode
Defines how two renderings are to be combined.
Produces stereoscopic renderings.
Definition: ParallaxStage.h:62
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
Defines a rendering viewport. The viewport is a property of the current OpenGL context.
Definition: Viewport.h:48
static const float DEFAULT_EYE_DISTANCE
Holds the default double distance that the camera is offset to left/right.
Definition: ParallaxStage.h:73
Defines Carna::presets::CompositionStage.