9 #include <unordered_map> 11 #include <NasNas/tilemapping/Layer.hpp> 12 #include <NasNas/tilemapping/Object.hpp> 20 auto getObjectsWithType(
const std::string& type)
const ->
const std::vector<std::reference_wrapper<Object>>&;
21 auto getObjectsWithName(
const std::string& name)
const ->
const std::vector<std::reference_wrapper<Object>>&;
23 auto allPoints()
const ->
const std::vector<PointObject>&;
24 auto allRectangles()
const ->
const std::vector<RectangleObject>&;
25 auto allEllipses()
const ->
const std::vector<EllipseObject>&;
26 auto allPolylines()
const ->
const std::vector<PolylineObject>&;
27 auto allPolygons()
const ->
const std::vector<PolygonObject>&;
29 auto getPoint(
unsigned int id)
const ->
const PointObject&;
31 auto getEllipse(
unsigned int id)
const ->
const EllipseObject&;
33 auto getPolygon(
unsigned int id)
const ->
const PolygonObject&;
36 void draw(sf::RenderTarget& target, sf::RenderStates states)
const override;
38 sf::Color m_color = sf::Color(180, 180, 180);
40 std::vector<PointObject> m_points;
41 std::vector<RectangleObject> m_rectangles;
42 std::vector<EllipseObject> m_ellipses;
43 std::vector<PolylineObject> m_polylines;
44 std::vector<PolygonObject> m_polygons;
45 std::vector<TileObject> m_tiles;
47 std::vector<std::reference_wrapper<Object>> m_objects;
48 std::unordered_map<std::string, std::vector<std::reference_wrapper<Object>>> m_objects_by_type;
49 std::unordered_map<std::string, std::vector<std::reference_wrapper<Object>>> m_objects_by_name;
50 std::vector<std::reference_wrapper<Object>> m_empty_object_vector;