20 #ifndef ANTKEEPER_SCENE_COLLECTION_HPP
21 #define ANTKEEPER_SCENE_COLLECTION_HPP
25 #include <unordered_map>
56 [[nodiscard]]
inline const std::vector<object_base*>&
get_objects() const noexcept
68 [[nodiscard]]
inline const std::vector<object_base*>&
get_objects(std::size_t type_id)
const
70 return m_object_map[type_id];
88 [[nodiscard]]
inline float get_scale() const noexcept
96 std::vector<object_base*> m_objects;
97 mutable std::unordered_map<std::size_t, std::vector<object_base*>> m_object_map;
Collection of scene objects.
void add_object(object_base &object)
Adds an object to the collection.
void remove_object(const object_base &object)
Removes an object from the collection.
const std::vector< object_base * > & get_objects(std::size_t type_id) const
Returns all objects in the collection with the given type ID.
float get_scale() const noexcept
Returns the ratio of meters to scene units.
void remove_objects()
Removes all objects from the collection.
void set_scale(float scale) noexcept
Sets the scale of the scene.
const std::vector< object_base * > & get_objects() const noexcept
Returns all objects in the collection.
Abstract base class for scene objects.
constexpr mat4< T > scale(const vec3< T > &v)
Constructs a scale matrix.