5#define GLM_ENABLE_EXPERIMENTAL
6#include "glm/gtx/hash.hpp"
274 std::vector<boost::optional<SharedObject>>
toShared();
292 SpecificID _createObject(
Object*
object, boost::optional<EntityID>
id = boost::none);
Definition: dungeonmaster.hpp:11
Definition: objectmanager.hpp:26
~ObjectManager()
Definition: objectmanager.cpp:30
SmartVector< Object * > getObjects()
Get a list of all objects in this game instance at the current timestep.
Definition: objectmanager.cpp:271
Object * getBaseObject(SpecificID base_objectID)
Attempts to retrieve the Object with the given SpecificID.
Definition: objectmanager.cpp:280
SmartVector< Projectile * > getProjectiles()
Get a list of all Projectiles in this game instance at the current timestep.
Definition: objectmanager.cpp:332
Torchlight * getTorchlight(SpecificID torchlightID)
Attempts to retrieve the Torchlight with the given SpecificID.
Definition: objectmanager.cpp:304
SmartVector< Enemy * > getEnemies()
Get a list of all Enemies in this game instance at the current timestep.
Definition: objectmanager.cpp:324
SmartVector< Item * > getItems()
Get a list of all items in this game instance at the current timestep.
Definition: objectmanager.cpp:312
std::unordered_map< glm::ivec2, std::vector< Object * > > cellToObjects
Hashmap that maps GridCell (x, y) positions to a vector of Objects that occupy / overlap that GridCel...
Definition: objectmanager.hpp:264
SmartVector< SolidSurface * > getSolidSurfaces()
Get a list of all SolidSurfaces in this game instance at the current timestep.
Definition: objectmanager.cpp:316
ObjectManager()
Definition: objectmanager.cpp:20
std::vector< boost::optional< SharedObject > > toShared()
Generates a list of SharedObjects that corresponds to all objects in the game instance.
Definition: objectmanager.cpp:389
SmartVector< Torchlight * > getTorchlights()
Get a list of all Projectiles in this game instance at the current timestep.
Definition: objectmanager.cpp:340
SmartVector< Player * > getPlayers()
Get a list of all Players in this game instance at the current timestep.
Definition: objectmanager.cpp:320
Enemy * getEnemy(SpecificID enemyID)
Attempts to retrieve the Enemy with the given SpecificID.
Definition: objectmanager.cpp:300
Object * getObject(EntityID globalID)
Attempts to retrieve the object with the given EntityID.
Definition: objectmanager.cpp:267
SmartVector< WeaponCollider * > getWeaponColliders()
Get a list of all WeaponCollider in this game instance at the current timestep.
Definition: objectmanager.cpp:336
Item * getItem(SpecificID itemID)
Attempts to retrieve the Item with the given SpecificID.
Definition: objectmanager.cpp:288
bool replaceObject(EntityID globalID, Object *object)
Replaces the object with the given EntityID with the given Object, if there currently exists an objec...
Definition: objectmanager.cpp:249
bool removeObject(EntityID globalID)
Attempts to remove an object with the given EntityID.
Definition: objectmanager.cpp:134
SmartVector< Trap * > getTraps()
Get a list of all Traps in this game instance at the current timestep.
Definition: objectmanager.cpp:328
Player * getPlayer(SpecificID playerID)
Attempts to retrieve the Player with the given SpecificID.
Definition: objectmanager.cpp:296
SolidSurface * getSolidSurface(SpecificID surfaceID)
Attempts to retrieve the SolidSurface with the given SpecificID.
Definition: objectmanager.cpp:292
SpecificID createObject(Object *object)
Creates a new object with the specified type.
Definition: objectmanager.cpp:36
std::vector< glm::ivec2 > objectGridCells(Object *object)
Given an object, his function will return a vector of positions of GridCells that are currently occup...
Definition: objectmanager.cpp:382
SmartVector< Object * > getMovableObjects()
Get a list of all objects in this game instance at the current timestep that are MOVABLE.
Definition: objectmanager.cpp:275
SmartVector< Exit * > getExits()
Get a list of all Exits in this game instance at the current timestep.
Definition: objectmanager.cpp:344
Trap * getTrap(SpecificID trapID)
Attempts to retrieve the Trap with the given SpecificID.
Definition: objectmanager.cpp:308
DungeonMaster * getDM()
Get the Dungeon Master pointer.
Definition: objectmanager.cpp:284
bool moveObject(Object *object, glm::vec3 newCornerPosition)
Attempts to move the given Object to the given corner position, updating its GridCell position vector...
Definition: objectmanager.cpp:349
Definition: object.hpp:95
Definition: projectile.hpp:20
SmartVector is a wrapper for the std::vector class that adds objects either to the end of the wrapped...
Definition: smartvector.hpp:16
Definition: solidsurface.hpp:5
Definition: torchlight.hpp:8
Definition: weaponcollider.hpp:12
uint32_t EntityID
Global Object ID (when the server or client references an object with a particular EntityID,...
Definition: typedefs.hpp:9
uint32_t SpecificID
Object ID within an object type-specific SmartVector (used by ServerGameState's ObjectManager)
Definition: typedefs.hpp:16