PGR Copakond OpenGL Engine - Bowling
Loading...
Searching...
No Matches
bowlingScene.h
Go to the documentation of this file.
1#ifndef PGR_SEM_COPAKOND_BOWLINGSCENE_H
2#define PGR_SEM_COPAKOND_BOWLINGSCENE_H
3
4#include "../scene.h"
5#include "bowlingGame.h"
7
8namespace copakond {
10 class RigidBody;
11
13 class BowlingScene : public Scene {
14 private:
15 BowlingGame *game;
16 InputControllerBowling* inputController = nullptr;
17 RigidBody *player = nullptr;
18
19 float clockTime[3] = {0, 0, 0}; // hh:mm:ss
20 std::vector<int> bowlingBallIds = {};
21
22 ImageLabel* clock = nullptr;
23 ImageLabel* clockHandSec = nullptr;
24 ImageLabel* clockHandMin = nullptr;
25 ImageLabel* clockHandHour = nullptr;
26
27 void initLights();
28
29 public:
30 BowlingScene(const char *sceneName, Input* input, Shader* shader, int winWidth, int winHeight);
31 ~BowlingScene() override;
32
33 void init() override;
34 void update(float deltaTime) override;
35 void physics_update(float deltaTime) override;
36
37 void onMouseButtonEvent(int button, int state, int x, int y) override;
38 void onMenuEvent(int option) override;
39 void onMouseWheelEvent(int wheel, int direction, int x, int y) override;
40 void onKeyboardEvent(unsigned char key, int x, int y, bool isDown) override;
41
42 BowlingGame *getGame() { return game; }
43 std::vector<int> getBowlingBallIds() { return bowlingBallIds; }
44 float *getClock() { return clockTime; }
45 };
46}
47
48#endif //PGR_SEM_COPAKOND_BOWLINGSCENE_H
Core logic manager handling bowling rules, scoring, and lane interactions.
Definition bowlingGame.h:28
void init() override
Definition bowlingScene.cpp:57
float * getClock()
Definition bowlingScene.h:44
void update(float deltaTime) override
Definition bowlingScene.cpp:609
~BowlingScene() override
Definition bowlingScene.cpp:12
std::vector< int > getBowlingBallIds()
Definition bowlingScene.h:43
void physics_update(float deltaTime) override
Fixed-step physics update loop for resolving collisions and forces.
Definition bowlingScene.cpp:658
void onMouseButtonEvent(int button, int state, int x, int y) override
Definition bowlingScene.cpp:668
void onMouseWheelEvent(int wheel, int direction, int x, int y) override
Definition bowlingScene.cpp:672
BowlingGame * getGame()
Definition bowlingScene.h:42
void onKeyboardEvent(unsigned char key, int x, int y, bool isDown) override
Definition bowlingScene.cpp:662
void onMenuEvent(int option) override
Definition bowlingScene.cpp:684
BowlingScene(const char *sceneName, Input *input, Shader *shader, int winWidth, int winHeight)
Definition bowlingScene.cpp:8
Static 2D image plane, implemented as a paused 1-frame image sequence.
Definition imageLabel.h:7
Bowling-specific player controller handling throwing mechanics and scene interactions.
Definition inputControllerBowling.h:15
Global input manager tracking keyboard states and mouse deltas.
Definition input.h:20
Kinematic object affected by gravity, friction, and collision resolution.
Definition rigidBody.h:7
Shader * shader
Definition scene.h:36
Scene(const char *sceneName, Input *engineInput, Shader *engineShader, int winWidth, int winHeight)
Definition scene.h:57
Input * input
Definition scene.h:35
int winWidth
Definition scene.h:48
int winHeight
Definition scene.h:49
Core manager for shader program compilation, uniform binding, and rendering.
Definition shader.h:13
PGR Semestral work with sample scenes and bowling. doxygen was generated with a help of LLM.
Definition bezier.cpp:3