Vis 2
Kinetic Visualization for 3D shape and structure
 All Classes Namespaces Functions Pages
Camera.h
1 #pragma once
2 
3 #include "include_glm.h"
4 #include "Window.h"
5 
9 class Camera
10 {
11 public:
12  static void Initialize();
13 
14  //move camera and target on paralell lines
15  static void MoveX(const float &dist);
16  static void MoveY(const float &dist);
17  static void MoveZ(const float &dist);
18 
19  //Arrow Movement
20  static void MoveRight(void);
21  static void MoveLeft(void);
22  static void MoveUp(void);
23  static void MoveDown(void);
24  static void MoveCloser(void);
25  static void MoveAway(void);
26 
27  //ASDW Movement
28  static void MoveForward(void);
29  static void MoveBackward(void);
30  static void RotateRight(void);
31  static void RotateLeft(void);
32 
33  //Mouse Movement
34  static void MoveForwardMouse(const float &dist);
35  static void MoveBackwardMouse(const float &dist);
36  static void MoveRightMouse(const float &dist);
37  static void MoveLeftMouse(const float &dist);
38  static void RotateRightMouse(const float &dist);
39  static void RotateLeftMouse(const float &dist);
40  static void ZoomInMouseWheel(const float &dist);
41  static void ZoomOutMouseWheel(const float &dist);
42  static void LowerMouse(const float &dist);
43  static void RaiseMouse(const float &dist);
44 
45  //lower/raise camera, page down/up
46  static void Lower(void);
47  static void Raise(void);
48 
49  //move a distance toward location
50  static void MoveToward(glm::vec3 &location, const float &dist);
51 
52  //controlgroup Camera
53  static void JumpPos(glm::vec3 &position);
54 
55  //decreases distance between camera and target
56  static void ZoomIn(void);
57  //increases distance between camera and target
58  static void ZoomOut(void);
59 
60  //reset to default
61  static void Reset();
62 
63  //Lazy Recalculation of View Matrix from Forward Upward Right Vector
64  static glm::mat4 GetViewMatrix(void);
65  static glm::mat4 ProjectionMatrix;
66 
67 private:
68  Camera();
69  ~Camera();
70 
71  static bool Visible;
72  static float Scale;
73  static glm::vec3 Position;
74  static glm::vec3 Target;
75 
76  //the viewMatrix
77  static glm::mat4 ViewMatrix;
78 
79 
80  //orientational vectors
81  static glm::vec3 WorldUp;
82  static glm::vec3 Forward;
83  static glm::vec3 Right;
84  static glm::vec3 Upward;
85  static bool ViewHasChanged;
86  static double TimeOfLastAcceleration;
87  static float Acceleration;
88  static float Speed;
89  static float MaxSpeed;
90  static float MinAcceleration;
91  static float MaxAcceleration;
92  static double TimeOfLastAction;
93 
94  static float MinZoom;
95  static float MaxZoom;
96 
97  static float CameraMinY;
98  static float CameraMaxY;
99 
100  static glm::vec3 OldTarget;
101  static glm::vec3 OldPos;
102 
103  static void Accelerate(void);
104  static void Orientate(void);
105  static bool CameraInBounds(void);
106  static void SaveCamera();
107  static void LoadCamera();
108 
109 };
110 
Definition: Camera.h:9