Antkeeper  0.0.1
List of all members
scene::collection Class Reference

Collection of scene objects. More...

#include <collection.hpp>

Public Member Functions

Objects
void add_object (object_base &object)
 Adds an object to the collection. More...
 
void remove_object (const object_base &object)
 Removes an object from the collection. More...
 
void remove_objects ()
 Removes all objects from the collection. More...
 
const std::vector< object_base * > & get_objects () const noexcept
 Returns all objects in the collection. More...
 
const std::vector< object_base * > & get_objects (std::size_t type_id) const
 Returns all objects in the collection with the given type ID. More...
 
Settings
void set_scale (float scale) noexcept
 Sets the scale of the scene. More...
 
float get_scale () const noexcept
 Returns the ratio of meters to scene units. More...
 

Detailed Description

Collection of scene objects.

Definition at line 32 of file collection.hpp.

Member Function Documentation

◆ add_object()

void scene::collection::add_object ( object_base object)

Adds an object to the collection.

Parameters
objectObject to add.

Definition at line 24 of file collection.cpp.

◆ get_objects() [1/2]

const std::vector<object_base*>& scene::collection::get_objects ( ) const
inlinenoexcept

Returns all objects in the collection.

Definition at line 56 of file collection.hpp.

◆ get_objects() [2/2]

const std::vector<object_base*>& scene::collection::get_objects ( std::size_t  type_id) const
inline

Returns all objects in the collection with the given type ID.

Parameters
type_idScene object type ID.
Returns
Scene objects with the given type ID.

Definition at line 68 of file collection.hpp.

◆ get_scale()

float scene::collection::get_scale ( ) const
inlinenoexcept

Returns the ratio of meters to scene units.

Definition at line 88 of file collection.hpp.

◆ remove_object()

void scene::collection::remove_object ( const object_base object)

Removes an object from the collection.

Parameters
objectObject to remove.

Definition at line 30 of file collection.cpp.

◆ remove_objects()

void scene::collection::remove_objects ( )

Removes all objects from the collection.

Definition at line 36 of file collection.cpp.

◆ set_scale()

void scene::collection::set_scale ( float  scale)
inlinenoexcept

Sets the scale of the scene.

Parameters
scaleRatio of meters to scene units.

Definition at line 82 of file collection.hpp.


The documentation for this class was generated from the following files: