-
Notifications
You must be signed in to change notification settings - Fork 3
/
FixedCam.hpp
66 lines (56 loc) · 1.97 KB
/
FixedCam.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
/**
* @file FixedCam.hpp
* @brief Concrete Fixed Camera implementation with Perspective Projection that can be positioned, oriented, and never moved
* @author Dr. Jeffrey Paone
*
* @copyright MIT License Copyright (c) 2021 Dr. Jeffrey Paone
*
* These functions, classes, and constants help minimize common
* code that needs to be written.
*/
#ifndef CSCI441_FIXED_CAM_HPP
#define CSCI441_FIXED_CAM_HPP
#include "PerspectiveCamera.hpp"
namespace CSCI441 {
/**
* @brief A camera that can be positioned and oriented but never moved or rotated
* @note Must position via setPosition()
* @note Must orient via setLookAtPoint()
*/
class FixedCam final : public CSCI441::PerspectiveCamera {
public:
/**
* creates a FixedCam object with the specified perspective projection
* @param aspectRatio aspect ratio of view plane (defaults to 1.0f)
* @param fovy vertical field of view (defaults to 45.0f)
* @param nearClipPlane near z clip plane (defaults to 0.001f)
* @param farClipPlane far z clip plane (defaults to 1000.0f)
* @note field of view specified in degrees
*/
explicit FixedCam(GLfloat aspectRatio = 1.0f, GLfloat fovy = 45.0f, GLfloat nearClipPlane = 0.001f, GLfloat farClipPlane = 1000.0f);
/**
* @brief does nothing
*/
void recomputeOrientation() final {};
/**
* @brief does nothing
* @param unused does nothing
*/
void moveForward(const GLfloat unused) final {};
/**
* @brief does nothing
* @param unused does nothing
*/
void moveBackward(const GLfloat unused) final {};
private:
};
}
inline CSCI441::FixedCam::FixedCam(
const GLfloat aspectRatio,
const GLfloat fovy,
const GLfloat nearClipPlane,
const GLfloat farClipPlane
) : PerspectiveCamera(aspectRatio, fovy, nearClipPlane, farClipPlane)
{
}
#endif // CSCI441_FIXED_CAM_HPP