PGR Copakond OpenGL Engine - Bowling
Loading...
Searching...
No Matches
inputControllerBowling.h
Go to the documentation of this file.
1#ifndef PGR_SEM_COPAKOND_INPUTCONTROLLERBOWLING_H
2#define PGR_SEM_COPAKOND_INPUTCONTROLLERBOWLING_H
3
10
11namespace copakond {
12 class BowlingScene;
13
16 private:
17 bool _canMove = true;
18 bool _isFullScreen = false;
19
20 BowlingScene *scene;
21 LevelEditor* _levelEditor = nullptr;
22 Camera* camera;
23 Input* input;
24 Spline* _spline = nullptr;
25 RigidBody* player = nullptr;
26 float shootPower = 2.0f;
27 float _playerSpaceUpTick = 0.0f;
28
29 void toggleFullScreen();
30 void switchCamera(int mode);
31
32 public:
33 float baseSpeed = 1.5f;
34 float shiftMultiplier = 1.75f;
35 float mouseDragCoeff = 0.05f;
36
37 InputControllerBowling(Camera* cam, Input* input, BowlingScene* scene) : camera(cam), input(input), scene(scene) {};
38 void setPlayer(RigidBody* p) { player = p; }
39 void setLevelEditor(LevelEditor* lev) { _levelEditor = lev; }
40 LevelEditor* getLevelEditor() { return _levelEditor; }
41
42 void update(float deltaTime) override;
43 int raycast(int x, int y);
44 void setCameraSpline(Spline *spline) { _spline = spline; }
45
47 void selectBowlingBallE();
48 void onKeyboardEvent(unsigned char key, int x, int y, bool isDown) override;
49 void onMouseButtonEvent(int button, int state, int x, int y) override;
50 void onMenuEvent(int option) override;
51 };
52}
53
54#endif //PGR_SEM_COPAKOND_INPUTCONTROLLERBOWLING_H
Main playable scene containing the bowling alley environment and game loop.
Definition bowlingScene.h:13
Camera for generating view and projection matrices.
Definition camera.h:20
void onKeyboardEvent(unsigned char key, int x, int y, bool isDown) override
Definition inputControllerBowling.cpp:279
InputControllerBowling(Camera *cam, Input *input, BowlingScene *scene)
Definition inputControllerBowling.h:37
void onMouseButtonEvent(int button, int state, int x, int y) override
Definition inputControllerBowling.cpp:183
float baseSpeed
Definition inputControllerBowling.h:33
int raycast(int x, int y)
Definition inputControllerBowling.cpp:205
void setLevelEditor(LevelEditor *lev)
Definition inputControllerBowling.h:39
float shiftMultiplier
Definition inputControllerBowling.h:34
void selectBowlingBallE()
Triggers ball pickup logic when close to an available bowling ball.
Definition inputControllerBowling.cpp:189
void update(float deltaTime) override
Definition inputControllerBowling.cpp:9
LevelEditor * getLevelEditor()
Definition inputControllerBowling.h:40
void onMenuEvent(int option) override
Definition inputControllerBowling.cpp:216
float mouseDragCoeff
Definition inputControllerBowling.h:35
void setCameraSpline(Spline *spline)
Definition inputControllerBowling.h:44
void setPlayer(RigidBody *p)
Definition inputControllerBowling.h:38
Global input manager tracking keyboard states and mouse deltas.
Definition input.h:20
Runtime editor utility allowing the user to pick, move, and save mesh transformations.
Definition levelEditor.h:19
Kinematic object affected by gravity, friction, and collision resolution.
Definition rigidBody.h:7
Base class for parameterized spline animations.
Definition spline.h:9
PGR Semestral work with sample scenes and bowling. doxygen was generated with a help of LLM.
Definition bezier.cpp:3