AlpacaLibrary/Include/Game/Models/SceneObjects.hpp

68 lines
3.0 KiB
C++

#ifndef SCENEOBJECTS_HPP_INCLUDED
#define SCENEOBJECTS_HPP_INCLUDED
#include "../../Core/Classes/GameObject.hpp"
#include "../../Core/Classes/DecorativeObject.hpp"
#include "../../Core/Classes/GroundObject.hpp"
#include "../../Core/Classes/WallObject.hpp"
#include "../../Core/Types/Tile.hpp"
#include "../../Core/Types/Convex.hpp"
#include <functional>
#include <cstdint>
#include <vector>
#include <string>
/** @addtogroup Models
* @{ */
class SceneObjects
{
public:
typedef enum MODEL_TYPE
{
GAME_MODEL = (1 << 1),
DECORATIVE_MODEL = (1 << 2),
GROUND_MODEL = (1 << 3),
WALL_MODEL = (1 << 4),
ALL = (GAME_MODEL | DECORATIVE_MODEL | GROUND_MODEL | WALL_MODEL)
} MODEL_TYPE;
static std::vector<Object> GetAll(MODEL_TYPE ModelTypes = ALL);
static std::vector<Object> GetAll(const Tile& T, MODEL_TYPE ModelTypes = ALL);
static std::vector<Object> GetAll(std::int32_t ID, MODEL_TYPE ModelTypes = ALL);
static std::vector<Object> GetAll(const std::string& Name, MODEL_TYPE ModelTypes = ALL);
static std::vector<Object> GetAll(const std::vector<std::int32_t>& PossibleIDs, MODEL_TYPE ModelTypes = ALL);
static std::vector<Object> GetAll(const std::vector<std::string>& PossibleNames, MODEL_TYPE ModelTypes = ALL);
static std::vector<GameObject> GetAll(const std::function<bool (GameObject&)>& Filter);
static std::vector<DecorativeObject> GetAll(const std::function<bool (DecorativeObject&)>& Filter);
static std::vector<GroundObject> GetAll(const std::function<bool (GroundObject&)>& Filter);
static std::vector<WallObject> GetAll(const std::function<bool (WallObject&)>& Filter);
static Object Get(const Tile& T, MODEL_TYPE ModelTypes = ALL);
static Object Get(std::int32_t ID, MODEL_TYPE ModelTypes = ALL);
static Object Get(const std::string& Name, MODEL_TYPE ModelTypes = ALL);
static Object Get(const std::vector<std::int32_t>& PossibleIDs, MODEL_TYPE ModelTypes = ALL);
static Object Get(const std::vector<std::string>& PossibleNames, MODEL_TYPE ModelTypes = ALL);
static GameObject Get(const std::function<bool (GameObject&)>& Filter);
static DecorativeObject Get(const std::function<bool (DecorativeObject&)>& Filter);
static GroundObject Get(const std::function<bool (GroundObject&)>& Filter);
static WallObject Get(const std::function<bool (WallObject&)>& Filter);
static Tile GetTileOf(const GameObject& G);
static Tile GetTileOf(const DecorativeObject& D);
static Tile GetTileOf(const GroundObject& G);
static Tile GetTileOf(const WallObject& W);
static Convex GetConvexOf(const GameObject& G);
static Convex GetConvexOf(const DecorativeObject& D);
static Convex GetConvexOf(const GroundObject& G);
static Convex GetConvexOf(const WallObject& W);
};
/** @} */
#endif // SCENEOBJECTS_HPP_INCLUDED