84 const std::vector<float>&
heights,
85 const std::string&
name,
97 float lerp(
float a,
float b,
float t);
104 void update(
double deltaT);
105 void addTank(std::shared_ptr<SceneObject> tank);
123 std::vector<std::shared_ptr<Tank> >
tanks;
126 #endif //GAMELOGIC_HPP
std::shared_ptr< Bullet > bullet
Definition: gameLogic.hpp:120
float lerp(float a, float b, float t)
Definition: gameLogic.cpp:115
virtual ~Terrain()
Definition: gameLogic.hpp:87
Encapsulates a graphical object model in the GPU.
Definition: model.hpp:14
void update(double deltaT)
Definition: gameLogic.cpp:166
Model * model
Definition: sceneObject.hpp:69
void addTank(std::shared_ptr< SceneObject > tank)
Definition: gameLogic.cpp:158
size_t activeTank
Definition: gameLogic.hpp:115
bool isGameFinished() const
Definition: gameLogic.hpp:107
std::unique_ptr< Model > terrainModel
Definition: gameLogic.hpp:118
~GameLogic()
Definition: gameLogic.cpp:153
size_t dimY
Definition: gameLogic.hpp:93
Implements terrain height query.
Definition: gameLogic.hpp:79
std::shared_ptr< Terrain > getTerrain() const
Definition: gameLogic.hpp:109
size_t getWinner() const
Definition: gameLogic.hpp:108
Encapsulates the Rendering Engine, holds a complete scene and it's assets.
Definition: scene.hpp:71
Scene * scene
Definition: sceneObject.hpp:68
GameLogic(Scene *scene)
Definition: gameLogic.cpp:120
bool gameFinished
Definition: gameLogic.hpp:116
Terrain(size_t dimX, size_t dimY, float cellSize, const std::vector< float > &heights, const std::string &name, Scene *scene=0, Model *model=0, Shader *shader=0)
Definition: gameLogic.cpp:52
Implements the bullet movement on CPU.
Definition: gameLogic.cpp:14
std::vector< std::shared_ptr< Tank > > tanks
Definition: gameLogic.hpp:123
double turnTime
Definition: gameLogic.hpp:112
Encapsulates a texture in the GPU.
Definition: texture.hpp:10
std::unique_ptr< Texture > waterTexture
Definition: gameLogic.hpp:119
float cellSize
Definition: gameLogic.hpp:94
std::string name
Definition: sceneObject.hpp:73
Encapsulates a shader program.
Definition: shader.hpp:9
std::shared_ptr< Terrain > terrain
Definition: gameLogic.hpp:122
std::vector< float > heights
Definition: gameLogic.hpp:95
std::shared_ptr< Terrain > water
Definition: gameLogic.hpp:121
The base class of the objects which are rendered.
Definition: sceneObject.hpp:30
Implements the tank functionalities.
Definition: tank.hpp:15
size_t dimX
Definition: gameLogic.hpp:92
float getHeight(float x, float y)
Definition: gameLogic.cpp:69
Shader * shader
Definition: sceneObject.hpp:70
std::unique_ptr< Model > waterModel
Definition: gameLogic.hpp:117
Implements the game logic of SteelWorms.
Definition: gameLogic.hpp:75