Carna Version 3.3.3
Loading...
Searching...
No Matches
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
21namespace Carna
22{
23
24namespace base
25{
26
27
28
29// ----------------------------------------------------------------------------------
30// Camera
31// ----------------------------------------------------------------------------------
32
39class CARNA_LIB Camera : public Spatial
40{
41
42 math::Matrix4f myViewTransform;
43
44 math::Matrix4f myProjection;
45
46 bool orthogonalProjectionHint;
47
48public:
49
54
61
67 const math::Matrix4f& projection() const;
68
73
78
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 an association.
Definition Association.h:45
Represents the point-of-view and defines the 3D to 2D projection.
Definition Camera.h:40
Camera()
Instantiates with setOrthogonalProjectionHint set to false.
const math::Matrix4f & projection() const
References the projection matrix of this camera. The projection matrix maps from view space to clippi...
virtual void updateWorldTransform() override
Updates the viewTransform matrix.
void setProjection(const math::Matrix4f &)
Sets the matrix that is to be used for mapping view space to clipping coordinates....
bool isOrthogonalProjectionHintSet() const
Tells whether projection is likely to be orthogonal or perspectival.
void setOrthogonalProjectionHint(bool isOrthogonalProjection)
Sets hint whether projection is orthogonal or perspectival.
const math::Matrix4f & viewTransform() const
References the view matrix, that is the inverse worldTransform matrix.
Represents a spatial scene element. It's location is determined relatively to another spatial that is...
Definition Spatial.h:45
Eigen::Matrix< float, 4, 4, Eigen::ColMajor > Matrix4f
Defines matrix.
Definition math.h:193