LibCarna Version 3.4.0
Loading...
Searching...
No Matches
OrthogonalControl.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 ORTHOGONALCONTROL_H_6014714286
16#define ORTHOGONALCONTROL_H_6014714286
17
18#include <LibCarna/LibCarna.hpp>
21
27namespace LibCarna
28{
29
30namespace presets
31{
32
33
34
35// ----------------------------------------------------------------------------------
36// OrthogonalControl
37// ----------------------------------------------------------------------------------
38
51{
52
54
55 struct Details;
56 const std::unique_ptr< Details > pimpl;
57
58public:
59
63 const static float DEFAULT_ZOOM_STRENGTH;
64
70
75
79 void setZoomStrength( float zoomStrength );
80
84 float zoomStrength() const;
85
89 void setRotationEnabled( bool isRotationEnabled );
90
94 bool isRotationEnabled() const;
95
99 float zoomFactor() const;
100
104 virtual void updateProjection( base::math::Matrix4f& orthogonalProjection ) const override;
105
111 virtual void setCamera( base::Spatial& camera ) override;
112
117 virtual void rotateHorizontally( float radians ) override;
118
123 virtual void rotateVertically( float radians ) override;
124
128 virtual void moveAxially( float units ) override;
129
130 virtual void moveLaterally( float unitsX, float unitsY ) override;
131
132}; // OrthogonalControl
133
134
135
136} // namespace LibCarna :: presets
137
138} // namespace LibCarna
139
140
141
142#endif // ORTHOGONALCONTROL_H_6014714286
Defines LibCarna::base::CameraControl.
Contains forward-declarations.
Defines LibCarna::base::ProjectionControl.
Defines interface for intuitive Camera control.
Controls projection matrices.
Represents a spatial scene element. It's location is determined relatively to another spatial that is...
Definition Spatial.hpp:48
Controls orthogonal projection matrices, that induce box-shaped visible volume, and base::Camera obje...
virtual void rotateVertically(float radians) override
Delegates to the base::CameraControl implementation that was supplied to the constructor.
virtual void updateProjection(base::math::Matrix4f &orthogonalProjection) const override
Creates orthogonalProjection matrix using base::math::ortho4f.
virtual void moveLaterally(float unitsX, float unitsY) override
Moves the camera along its x-/y-axis. The parameters of this movement depend on the implementation.
static const float DEFAULT_ZOOM_STRENGTH
Default factor.
float zoomStrength() const
Tells the factor.
virtual void rotateHorizontally(float radians) override
Delegates to the base::CameraControl implementation that was supplied to the constructor.
bool isRotationEnabled() const
Tells whether rotateHorizontally and rotateVertically are enabled.
float zoomFactor() const
Tells current zoom factor.
OrthogonalControl(base::CameraControl *cc)
Instantiates.
void setRotationEnabled(bool isRotationEnabled)
Enables and disables rotateHorizontally and rotateVertically.
virtual void moveAxially(float units) override
Updates the result updateProjection produces.
void setZoomStrength(float zoomStrength)
Sets the factor.
virtual void setCamera(base::Spatial &camera) override
Sets the camera that this object should control. Also sets the orthogonal projection hint if camera i...
Eigen::Matrix< float, 4, 4, Eigen::ColMajor > Matrix4f
Defines matrix.
Definition math.hpp:197
#define NON_COPYABLE
Marks the class that it is placed in as non-copyable.