LibCarna Version 3.4.0
Loading...
Searching...
No Matches
ParallaxStage.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 PARALLAXSTAGE_H_6014714286
16#define PARALLAXSTAGE_H_6014714286
17
19
25namespace LibCarna
26{
27
28namespace presets
29{
30
31
32
33// ----------------------------------------------------------------------------------
34// ParallaxStage
35// ----------------------------------------------------------------------------------
36
65class LIBCARNA ParallaxStage : public CompositionStage
66{
67
68 struct Details;
69 const std::unique_ptr< Details > pimpl;
70
71public:
72
76 const static float DEFAULT_EYE_DISTANCE;
77
81 explicit ParallaxStage( CompositionMode compositionMode );
82
86 virtual ~ParallaxStage();
87
91 void setEyeDistance( float );
92
96 float eyeDistance() const;
97
98protected:
99
100 virtual void renderPass
101 ( const base::math::Matrix4f& viewTransform
102 , base::RenderTask& rt
103 , const base::Viewport& vp
104 , bool isFirstInvocation
105 , bool isFirstSource ) override;
106
107}; // ParallaxStage
108
109
110
111} // namespace LibCarna :: presets
112
113} // namespace LibCarna
114
115#endif // PARALLAXSTAGE_H_6014714286
Defines LibCarna::presets::CompositionStage.
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
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 ~ParallaxStage()
Deletes.
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.
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.hpp:197