Carna  Version 3.0.1
Camera.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 CAMERA_H_6014714286
13 #define CAMERA_H_6014714286
14 
19 #include <Carna/base/Spatial.h>
20 
21 namespace Carna
22 {
23 
24 namespace base
25 {
26 
27 
28 
29 // ----------------------------------------------------------------------------------
30 // Camera
31 // ----------------------------------------------------------------------------------
32 
39 class CARNA_LIB Camera : public Spatial
40 {
41 
42  math::Matrix4f myViewTransform;
43 
44  math::Matrix4f myProjection;
45 
46  bool orthogonalProjectionHint;
47 
48 public:
49 
53  Camera();
54 
60  void setProjection( const math::Matrix4f& );
61 
67  const math::Matrix4f& projection() const;
68 
72  void setOrthogonalProjectionHint( bool isOrthogonalProjection );
73 
77  bool isOrthogonalProjectionHintSet() const;
78 
83  const math::Matrix4f& viewTransform() const;
84 
88  virtual void updateWorldTransform() override;
89 
90 }; // Camera
91 
92 
93 
94 } // namespace Carna :: base
95 
96 } // namespace Carna
97 
98 #endif // CAMERA_H_6014714286
Defines Carna::base::Spatial.
Represents a spatial scene element. It's location is determined relatively to another spatial that is...
Definition: Spatial.h:44
Eigen::Matrix< float, 4, 4, Eigen::ColMajor > Matrix4f
Defines matrix.
Definition: math.h:193
Represents the point-of-view and defines the 3D to 2D projection.
Definition: Camera.h:39