LibCarna Version 3.4.0
Loading...
Searching...
No Matches
ProjectionControl.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 PROJECTIONCONTROL_H_6014714286
16#define PROJECTIONCONTROL_H_6014714286
17
18#include <LibCarna/LibCarna.hpp>
20#include <memory>
21
27namespace LibCarna
28{
29
30namespace base
31{
32
33
34
35// ----------------------------------------------------------------------------------
36// ProjectionControl
37// ----------------------------------------------------------------------------------
38
44class LIBCARNA ProjectionControl
45{
46
48
49 struct Details;
50 const std::unique_ptr< Details > pimpl;
51
52public:
53
59
65
70
75
82 void setViewportWidth( unsigned int width );
83
90 void setViewportHeight( unsigned int height );
91
96 unsigned int viewportWidth() const;
97
102 unsigned int viewportHeight() const;
103
110 void setMinimumVisibleDistance( float minimumVisibleDistance );
111
118 void setMaximumVisibleDistance( float maximumVisibleDistance );
119
124
129
134
140 bool isUpdateAvailable() const;
141
142protected:
143
148
153
154}; // ProjectionControl
155
156
157
158} // namespace LibCarna :: base
159
160} // namespace LibCarna
161
162
163
164#endif // PROJECTIONCONTROL_H_6014714286
Contains forward-declarations.
Represents an association.
Controls projection matrices.
bool isUpdateAvailable() const
Tells true when probably a new projection matrix is available and false when updateProjection is like...
static const float DEFAULT_MINIMUM_VISIBLE_DISTANCE
Holds default 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.
void setMinimumVisibleDistance(float minimumVisibleDistance)
Sets near clipping plane distance that should be used by updateProjection.
static const float DEFAULT_MAXIMUM_VISIBLE_DISTANCE
Holds default far clipping plane distance that should be used by updateProjection.
float maximumVisibleDistance() const
Tells far clipping plane distance that is used by updateProjection.
void setProjectionValidated() const
Denotes that no update is available.
void setViewportWidth(unsigned int width)
Sets the width of the viewport updateProjection should create projection matrices for.
void invalidateProjection()
Denotes that an update is available.
void setViewportHeight(unsigned int height)
Sets the height of the viewport updateProjection should create projection matrices for.
void setMaximumVisibleDistance(float maximumVisibleDistance)
Sets far clipping plane distance that should be used by updateProjection.
unsigned int viewportHeight() const
Tells the height of the viewport updateProjection should create projection matrices for.
virtual ~ProjectionControl()
Deletes.
float minimumVisibleDistance() const
Tells near clipping plane distance that is used by updateProjection.
unsigned int viewportWidth() const
Tells the width of the viewport updateProjection should create projection matrices for.
Defines LibCarna::base::math namespace and LIBCARNA_FOR_VECTOR3UI.
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.