Carna Version 3.3.3
Loading...
Searching...
No Matches
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
21namespace Carna
22{
23
24namespace presets
25{
26
27
28
29// ----------------------------------------------------------------------------------
30// ParallaxStage
31// ----------------------------------------------------------------------------------
32
62class CARNA_LIB ParallaxStage : public CompositionStage
63{
64
65 struct Details;
66 const std::unique_ptr< Details > pimpl;
67
68public:
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
97protected:
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 Carna::presets::CompositionStage.
Invokes the rendering stages of the frame renderer successively.
Definition RenderTask.h:41
Defines a rendering viewport. The viewport is a property of the current OpenGL context.
Definition Viewport.h:49
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.
float eyeDistance() const
Tells the double of the distance that the camera is offset to left/right.
virtual void renderPass(const base::math::Matrix4f &viewTransform, base::RenderTask &rt, const base::Viewport &vp, bool isFirstInvocation, bool isFirstSource) override
Renders one of the two renderings that are to be combined per invocation.
virtual ~ParallaxStage()
Deletes.
ParallaxStage * clone() const override
Returns same RenderStage implementation with same configuration.
static const float DEFAULT_EYE_DISTANCE
Holds the default double distance that the camera is offset to left/right.
ParallaxStage(CompositionMode compositionMode)
Sets the eye distance to DEFAULT_EYE_DISTANCE.
void setEyeDistance(float)
Sets the double of the distance that the camera is offset to left/right.
Eigen::Matrix< float, 4, 4, Eigen::ColMajor > Matrix4f
Defines matrix.
Definition math.h:193