5 #include <unordered_map>
9 #include <bullet/btBulletDynamicsCommon.h>
18 class QOpenGLFunctions;
19 class QOpenGLShaderProgram;
22 class btCollisionObject;
23 class btDiscreteDynamicsWorld;
27 class AbstractGraphicsObject;
28 class AbstractPhysicsObject;
57 World(
Game & game,
bool isNetworkGame,
bool isPlayerOne,
unsigned int terrainSeed);
72 void render(QOpenGLFunctions & gl)
const;
void render(QOpenGLFunctions &gl) const
Definition: world.cpp:139
std::unique_ptr< LocalPlayer > m_localPlayer
Definition: world.h:115
Train & localPlayerTrain()
Definition: world.cpp:181
void deleteObject(AbstractGraphicsObject *object)
Definition: world.cpp:103
Train & enemyPlayerTrain()
Definition: world.cpp:186
std::shared_ptr< BulletWorld > bulletWorld()
Returns a shared pointer to the corresponding BulletWorld.
Definition: world.cpp:206
The Timer class implements a set of pauseable duration counters (subsequently called timers) and mech...
Definition: timer.h:18
Level m_level
Definition: world.h:104
The Game class is the main entry point. It subclasses QQuickItem and handles all communication betwee...
Definition: game.h:36
void scheduleAction(ActionScheduler::Action event)
Definition: world.cpp:211
The Level class is a generator for level data such as terrain geometry and track courses.
Definition: level.h:26
Game & m_game
Definition: world.h:102
std::shared_ptr< Train > m_rightTrain
Definition: world.h:112
LightManager m_lightManager
Definition: world.h:106
LightManager & lightManager()
Definition: world.cpp:201
The AbstractGraphicsObject class is the root of a class hierarchy of objects that contain independen ...
Definition: abstractgraphicsobject.h:27
Timer & timer()
Definition: world.cpp:196
std::shared_ptr< Train > m_leftTrain
Definition: world.h:113
std::function< bool(void)> Action
functions that can be stored as actions can not have parameters and must return a bool whether they s...
Definition: actionscheduler.h:23
World & operator=(const World &other)=delete
Delete assignment operator.
The NetworkManager implements the basic functionality for the multiplayer mode of this game...
Definition: networkmanager.h:28
The LightManager class manages slots that can be filled with Light instances and is able to set those...
Definition: lightmanager.h:21
AbstractPlayer & enemyPlayer()
Definition: world.cpp:176
World(Game &game, bool isNetworkGame, bool isPlayerOne, unsigned int terrainSeed)
Construct a world for a local or multiplayer game.
Definition: world.cpp:31
std::list< std::unique_ptr< AbstractGraphicsObject > > m_dynamicObjects
Definition: world.h:118
std::unique_ptr< SkyBox > m_skybox
Definition: world.h:110
The World class represents a running game instance and contains all graphical (3D) elements of the sc...
Definition: world.h:46
The LocalPlayer class represents a local player that interacts with the World and their Train...
Definition: localplayer.h:17
NetworkManager & networkManager()
Definition: world.cpp:216
std::unique_ptr< Terrain > m_terrain
Definition: world.h:111
std::unique_ptr< AbstractPlayer > m_enemyPlayer
Definition: world.h:116
std::shared_ptr< BulletWorld > m_bulletWorld
Definition: world.h:108
Definition: eventhandler.cpp:18
LocalPlayer & localPlayer()
Definition: world.cpp:171
void addObject(AbstractGraphicsObject *node)
Definition: world.cpp:98
Level & level()
Definition: world.cpp:191
The AbstractPlayer class is the base class for interacting with a train and a camera.
Definition: abstractplayer.h:21
~World()
Definition: world.cpp:93
void update()
Definition: world.cpp:112
The Train class works as a logical container for all wagons one train consists of.
Definition: train.h:25