GlistEngine
Loading...
Searching...
No Matches
gCameraController.h
Go to the documentation of this file.
1/*
2 * gCameraController.h
3 *
4 * Created on: Feb 5, 2026
5 * Author: Metehan Gezer
6 */
7
8#ifndef ENGINE_GRAPHICS_GCAMERACONTROLLER_H_
9#define ENGINE_GRAPHICS_GCAMERACONTROLLER_H_
10
11#include "gRenderObject.h"
12#include "gCamera.h"
13#include "gWindowEvents.h"
14#include <string>
15
59public:
63
64 void setCamera(gCamera* camera);
66
71 void update();
72
77 void setEnabled(bool enabled);
78 bool isEnabled() const;
79
85 void setPlayerIndex(int playerIndex);
86 int getPlayerIndex() const;
87
94
98 void setMoveSpeed(float speed);
99 float getMoveSpeed() const;
100
104 void setMouseSensitivity(float sensitivity);
105 float getMouseSensitivity() const;
106
111 void setGamepadLookSensitivity(float sensitivity);
113
114 static const std::string AXIS_HORIZONTAL;
115 static const std::string AXIS_VERTICAL;
116 static const std::string AXIS_ELEVATION;
117 static const std::string AXIS_LOOK_HORIZONTAL;
118 static const std::string AXIS_LOOK_VERTICAL;
119 static const std::string ACTION_TOGGLE;
120
121private:
122 void updateCamera();
123
124 gCamera* camera;
125 bool enabled;
126 int playerindex;
127 float movespeed;
128 float mousesensitivity;
129 float gamepadlooksensitivity;
130 float yaw;
131 float pitch;
132 glm::vec3 position;
133};
134
135#endif /* ENGINE_GRAPHICS_GCAMERACONTROLLER_H_ */
Definition gCameraController.h:58
void setEnabled(bool enabled)
void setGamepadLookSensitivity(float sensitivity)
static const std::string AXIS_ELEVATION
Up/down. Default: LShift(-)/Space(+), LB(-)/RB(+)
Definition gCameraController.h:116
float getMoveSpeed() const
float getMouseSensitivity() const
int getPlayerIndex() const
static const std::string AXIS_HORIZONTAL
Strafe. Default: A(-)/D(+), Left Stick X.
Definition gCameraController.h:114
static const std::string AXIS_LOOK_VERTICAL
Gamepad look vertical. Default: Right Stick Y.
Definition gCameraController.h:118
float getGamepadLookSensitivity() const
static const std::string AXIS_VERTICAL
Forward/back. Default: S(-)/W(+), Left Stick Y.
Definition gCameraController.h:115
void setMoveSpeed(float speed)
void setPlayerIndex(int playerIndex)
static const std::string AXIS_LOOK_HORIZONTAL
Gamepad look horizontal. Default: Right Stick X.
Definition gCameraController.h:117
static const std::string ACTION_TOGGLE
Toggle on/off. Default: ESC, Start.
Definition gCameraController.h:119
void setMouseSensitivity(float sensitivity)
bool isEnabled() const
gCameraController(gCamera *camera)
gCamera * getCamera() const
void setCamera(gCamera *camera)
Definition gCamera.h:19
Definition gRenderObject.h:25