AlpacaLibrary/Include/Game/Models/SceneObjects.hpp

75 lines
3.7 KiB
C++
Raw Normal View History

2017-12-25 23:49:48 +00:00
#ifndef SCENEOBJECTS_HPP_INCLUDED
#define SCENEOBJECTS_HPP_INCLUDED
2018-01-09 15:25:29 +00:00
#include "../../Core/Classes/GameObject.hpp"
#include "../../Core/Classes/DecorativeObject.hpp"
#include "../../Core/Classes/GroundObject.hpp"
#include "../../Core/Classes/WallObject.hpp"
2018-03-09 20:10:43 +00:00
#include "../../Core/Classes/ObjectInfo.hpp"
2017-12-25 23:49:48 +00:00
#include "../../Core/Types/Tile.hpp"
#include "../../Core/Types/Convex.hpp"
#include <functional>
#include <cstdint>
#include <vector>
#include <string>
/** @addtogroup Models
* @{ */
class SceneObjects
{
public:
2018-02-24 12:59:53 +00:00
typedef enum OBJECT_TYPE
2017-12-25 23:49:48 +00:00
{
2018-03-09 20:10:43 +00:00
GAME_OBJECT = (1 << 1),
DECORATIVE_OBJECT = (1 << 2),
GROUND_OBJECT = (1 << 3),
WALL_OBJECT = (1 << 4),
2018-02-24 12:59:53 +00:00
ALL = (GAME_OBJECT | DECORATIVE_OBJECT | GROUND_OBJECT | WALL_OBJECT)
} OBJECT_TYPE;
2017-12-25 23:49:48 +00:00
2018-02-24 12:59:53 +00:00
static std::vector<Object> GetAll(OBJECT_TYPE ObjectTypes = ALL);
static std::vector<Object> GetAll(const Tile& T, OBJECT_TYPE ObjectTypes = ALL);
static std::vector<Object> GetAll(std::int32_t ID, OBJECT_TYPE ObjectTypes = ALL);
static std::vector<Object> GetAll(const std::string& Name, OBJECT_TYPE ObjectTypes = ALL);
static std::vector<Object> GetAll(const std::vector<std::int32_t>& PossibleIDs, OBJECT_TYPE ObjectTypes = ALL);
static std::vector<Object> GetAll(const std::vector<std::string>& PossibleNames, OBJECT_TYPE ObjectTypes = ALL);
2017-12-25 23:49:48 +00:00
2018-03-18 14:38:29 +00:00
static std::vector<Internal::GameObject> GetAll(const std::function<bool (Internal::GameObject&)>& Filter);
static std::vector<Internal::DecorativeObject> GetAll(const std::function<bool (Internal::DecorativeObject&)>& Filter);
static std::vector<Internal::GroundObject> GetAll(const std::function<bool (Internal::GroundObject&)>& Filter);
static std::vector<Internal::WallObject> GetAll(const std::function<bool (Internal::WallObject&)>& Filter);
2017-12-25 23:49:48 +00:00
2018-02-24 12:59:53 +00:00
static Object Get(const Tile& T, OBJECT_TYPE ObjectTypes = ALL);
static Object Get(std::int32_t ID, OBJECT_TYPE ObjectTypes = ALL);
static Object Get(const std::string& Name, OBJECT_TYPE ObjectTypes = ALL);
static Object Get(const std::vector<std::int32_t>& PossibleIDs, OBJECT_TYPE ObjectTypes = ALL);
static Object Get(const std::vector<std::string>& PossibleNames, OBJECT_TYPE ObjectTypes = ALL);
2017-12-25 23:49:48 +00:00
2018-03-18 14:38:29 +00:00
static Internal::GameObject Get(const std::function<bool (Internal::GameObject&)>& Filter);
static Internal::DecorativeObject Get(const std::function<bool (Internal::DecorativeObject&)>& Filter);
static Internal::GroundObject Get(const std::function<bool (Internal::GroundObject&)>& Filter);
static Internal::WallObject Get(const std::function<bool (Internal::WallObject&)>& Filter);
2017-12-25 23:49:48 +00:00
2018-03-18 14:38:29 +00:00
static Internal::ObjectInfo GetInfoOf(const Object& O);
static Internal::ObjectInfo GetInfoOf(const Internal::GameObject& G);
static Internal::ObjectInfo GetInfoOf(const Internal::DecorativeObject& D);
static Internal::ObjectInfo GetInfoOf(const Internal::GroundObject& G);
static Internal::ObjectInfo GetInfoOf(const Internal::WallObject& W);
2018-03-09 20:10:43 +00:00
2018-03-18 14:38:29 +00:00
static Tile GetTileOf(const Internal::GameObject& G);
static Tile GetTileOf(const Internal::DecorativeObject& D);
static Tile GetTileOf(const Internal::GroundObject& G);
static Tile GetTileOf(const Internal::WallObject& W);
2017-12-25 23:49:48 +00:00
2018-03-18 14:38:29 +00:00
static Convex GetConvexOf(const Internal::GameObject& G);
static Convex GetConvexOf(const Internal::DecorativeObject& D);
static Convex GetConvexOf(const Internal::GroundObject& G);
static Convex GetConvexOf(const Internal::WallObject& W);
2017-12-25 23:49:48 +00:00
};
/** @} */
#endif // SCENEOBJECTS_HPP_INCLUDED