Program Listing for File World.h

Return to documentation for file (libs/mcg/include/mcg/World.h)

#pragma once

#include "AABB.h"
#include "Connection.h"
#include <memory>

class World {
  private:
    std::mt19937_64 gen;
    std::vector<std::unique_ptr<AABB>> aabbList;
    std::vector<std::unique_ptr<Block>> blockList;
    std::vector<std::unique_ptr<Entity>> entityList;
    std::vector<std::unique_ptr<Object>> objectList;
    std::vector<std::unique_ptr<Connection>> connectionList;

  public:
    std::vector<std::unique_ptr<AABB>>& getAABBList();

    std::vector<std::unique_ptr<Block>>& getBlockList();

    std::vector<std::unique_ptr<Entity>>& getEntityList();

    std::vector<std::unique_ptr<Object>>& getObjectList();

    std::vector<std::unique_ptr<Connection>>& getConnectionList();

    void addAABB(std::unique_ptr<AABB> aabb);

    void addEntity(std::unique_ptr<Entity> entity);

    void addBlock(std::unique_ptr<Block> block);

    void addObject(std::unique_ptr<Object> object);

    void addConnection(std::unique_ptr<Connection> connection);

    std::string virtual toLowLevelMapJSON();

    std::string virtual toSemanticMapJSON();

    void writeToFile(std::string jsonPath, std::string lowLevelMapJSONPath);

    World();

    std::mt19937_64& getRandom();

    void setRandom(int seed);

    virtual ~World();
};