Carna Version 3.3.3
Loading...
Searching...
No Matches
ProjectionControl.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 PROJECTIONCONTROL_H_6014714286
13#define PROJECTIONCONTROL_H_6014714286
14
15#include <Carna/Carna.h>
16#include <Carna/base/math.h>
17#include <memory>
18
23namespace Carna
24{
25
26namespace base
27{
28
29
30
31// ----------------------------------------------------------------------------------
32// ProjectionControl
33// ----------------------------------------------------------------------------------
34
41class CARNA_LIB ProjectionControl
42{
43
45
46 struct Details;
47 const std::unique_ptr< Details > pimpl;
48
49public:
50
56
62
67
72
79 void setViewportWidth( unsigned int width );
80
87 void setViewportHeight( unsigned int height );
88
93 unsigned int viewportWidth() const;
94
99 unsigned int viewportHeight() const;
100
107 void setMinimumVisibleDistance( float minimumVisibleDistance );
108
115 void setMaximumVisibleDistance( float maximumVisibleDistance );
116
121
126
131
137 bool isUpdateAvailable() const;
138
139protected:
140
145
150
151}; // ProjectionControl
152
153
154
155} // namespace Carna :: base
156
157} // namespace Carna
158
159
160
161#endif // PROJECTIONCONTROL_H_6014714286
162
Represents an association.
Definition Association.h:45
Controls projection matrices.
void setViewportWidth(unsigned int width)
Sets the width of the viewport updateProjection should create projection matrices for.
void setViewportHeight(unsigned int height)
Sets the height of the viewport updateProjection should create projection matrices for.
void invalidateProjection()
Denotes that an update is available.
float minimumVisibleDistance() const
Tells near clipping plane distance that is used by updateProjection.
void setProjectionValidated() const
Denotes that no update is available.
virtual ~ProjectionControl()
Deletes.
unsigned int viewportWidth() const
Tells the width of the viewport updateProjection should create projection matrices for.
static const float DEFAULT_MAXIMUM_VISIBLE_DISTANCE
Holds default far clipping plane distance that should be used by updateProjection.
static const float DEFAULT_MINIMUM_VISIBLE_DISTANCE
Holds default near clipping plane distance that should be used by updateProjection.
float maximumVisibleDistance() const
Tells far clipping plane distance that is used by updateProjection.
void setMaximumVisibleDistance(float maximumVisibleDistance)
Sets far clipping plane distance that should be used by updateProjection.
bool isUpdateAvailable() const
Tells true when probably a new projection matrix is available and false when updateProjection is like...
unsigned int viewportHeight() const
Tells the height of the viewport updateProjection should create projection matrices for.
void setMinimumVisibleDistance(float minimumVisibleDistance)
Sets near clipping plane distance that should be used by updateProjection.
virtual void updateProjection(math::Matrix4f &projectionMatrix) const =0
Creates projectionMatrix based on previously set parameters.
Defines Carna::base::math namespace and CARNA_FOR_VECTOR3UI.
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.