CameraBase.hh 1.16 KB
Newer Older
1
2
3
4
5
6
7
8
9
#pragma once

#include <ACGL/Math/Math.hh>

namespace ACGL{
namespace Scene{

/**
 * @brief Common interface for cameras
Philip Trettner's avatar
Philip Trettner committed
10
11
12
 *
 * This interface only contains getter on purpose.
 * All logic that wants to modify a camera should know the actual structure of the camera and therefore use the specific subclass.
13
14
15
16
17
18
19
20
 */
class CameraBase
{
protected:
    CameraBase();
public:
    virtual ~CameraBase();

Philip Trettner's avatar
Philip Trettner committed
21
22
23
24
    /**
     * @brief gets the Position of the camera
     * @return a 3-dimensional position in the global coordinate system
     */
25
    virtual glm::vec3 getPosition() const = 0;
Philip Trettner's avatar
Philip Trettner committed
26
27
28
29
    /**
     * @brief gets the ViewMatrix of the camera
     * @return a 4x4 matrix containing projection independent camera transforms
     */
30
    virtual glm::mat4 getViewMatrix() const = 0;
Philip Trettner's avatar
Philip Trettner committed
31
32
33
34
    /**
     * @brief gets the ProjectionMatrix of the camera
     * @return a 4x4 matrix containing the projection into normalized device coordinates
     */
35
    virtual glm::mat4 getProjectionMatrix() const = 0;
Philip Trettner's avatar
Philip Trettner committed
36
37
38
39
    /**
     * @brief gets the ViewportSize of the current viewport of this camera
     * @return the 2-dimensional size of the viewport
     */
40
41
42
43
44
    virtual glm::uvec2 getViewportSize() const = 0;
};

}
}