Carna Version 3.3.3
Loading...
Searching...
No Matches
OrthogonalControl.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 ORTHOGONALCONTROL_H_6014714286
13#define ORTHOGONALCONTROL_H_6014714286
14
15#include <Carna/Carna.h>
18
23namespace Carna
24{
25
26namespace presets
27{
28
29
30
31// ----------------------------------------------------------------------------------
32// OrthogonalControl
33// ----------------------------------------------------------------------------------
34
48{
49
51
52 struct Details;
53 const std::unique_ptr< Details > pimpl;
54
55public:
56
60 const static float DEFAULT_ZOOM_STRENGTH;
61
67
72
76 void setZoomStrength( float zoomStrength );
77
81 float zoomStrength() const;
82
86 void setRotationEnabled( bool isRotationEnabled );
87
91 bool isRotationEnabled() const;
92
96 float zoomFactor() const;
97
101 virtual void updateProjection( base::math::Matrix4f& orthogonalProjection ) const override;
102
108 virtual void setCamera( base::Spatial& camera ) override;
109
114 virtual void rotateHorizontally( float radians ) override;
115
120 virtual void rotateVertically( float radians ) override;
121
125 virtual void moveAxially( float units ) override;
126
127 virtual void moveLaterally( float unitsX, float unitsY ) override;
128
129}; // OrthogonalControl
130
131
132
133} // namespace Carna :: presets
134
135} // namespace Carna
136
137
138
139#endif // ORTHOGONALCONTROL_H_6014714286
140
Defines Carna::base::CameraControl.
Defines Carna::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.h:45
Controls orthogonal projection matrices, that induce box-shaped visible volume, and base::Camera obje...
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.
bool isRotationEnabled() const
Tells whether rotateHorizontally and rotateVertically are enabled.
virtual void setCamera(base::Spatial &camera) override
Sets the camera that this object should control. Also sets the orthogonal projection hint if camera i...
float zoomStrength() const
Tells the factor.
virtual void rotateVertically(float radians) override
Delegates to the base::CameraControl implementation that was supplied to the constructor.
void setRotationEnabled(bool isRotationEnabled)
Enables and disables rotateHorizontally and rotateVertically.
void setZoomStrength(float zoomStrength)
Sets the factor.
virtual void updateProjection(base::math::Matrix4f &orthogonalProjection) const override
Creates orthogonalProjection matrix using base::math::ortho4f.
virtual void moveAxially(float units) override
Updates the result updateProjection produces.
OrthogonalControl(base::CameraControl *cc)
Instantiates.
virtual ~OrthogonalControl()
Deletes.
virtual void rotateHorizontally(float radians) override
Delegates to the base::CameraControl implementation that was supplied to the constructor.
static const float DEFAULT_ZOOM_STRENGTH
Default factor.
float zoomFactor() const
Tells current zoom factor.
Eigen::Matrix< float, 4, 4, Eigen::ColMajor > Matrix4f
Defines matrix.
Definition math.h:193
#define NON_COPYABLE
Features class it is placed in as non-copyable.