18 std::shared_ptr<Transform> transform;
19 std::vector <std::shared_ptr<Component>> components;
20 std::vector<std::shared_ptr<Entity>> entities;
22 std::shared_ptr<Physics::CollisionData> collision_data;
32 Scene(
const std::string scene_name);
38 void setTransform(std::shared_ptr<Transform> transform) noexcept;
44 std::shared_ptr<Transform>
getTransform()
const noexcept;
56 void addComponent(std::shared_ptr<Physics::CollisionData> collision_data);
62 void addComponents(std::vector<std::shared_ptr<Component>> components);
68 std::vector<std::shared_ptr<Component>>
getComponents()
const noexcept;
81 void addEntity(std::shared_ptr<Entity> entity) noexcept;
87 void addEntities(std::vector<std::shared_ptr<Entity>> entities) noexcept;
93 std::vector<std::shared_ptr<Entity>>
getEntities()
const noexcept;
99 void setName(
const std::string name) noexcept;
105 std::string
getName()
const noexcept;
std::string getName() const noexcept
Gets the name.
Definition: scene.cpp:65
std::vector< std::shared_ptr< Component > > getComponents() const noexcept
Gets all components.
Definition: scene.cpp:31
std::string to_string() const noexcept
Returns a string representation of the object, mostly for use in chaiscript.
Definition: scene.cpp:69
void addEntity(std::shared_ptr< Entity > entity) noexcept
Adds an entity.
Definition: scene.cpp:39
std::shared_ptr< Physics::CollisionData > getCollisionData() const noexcept
Gets the collision data.
Definition: scene.cpp:35
std::shared_ptr< Transform > getTransform() const noexcept
Gets the transform.
Definition: scene.cpp:14
A container holding a base transform, a vector of components, and a vector of entities.
Definition: scene.h:16
void addComponents(std::vector< std::shared_ptr< Component >> components)
Adds components.
Definition: scene.cpp:27
void setName(const std::string name) noexcept
Sets the name.
Definition: scene.cpp:61
std::vector< std::shared_ptr< Entity > > getEntities() const noexcept
Gets all entities.
Definition: scene.cpp:57
void addComponent(std::shared_ptr< Component > component)
Adds a component.
Definition: scene.cpp:18
void addEntities(std::vector< std::shared_ptr< Entity >> entities) noexcept
Adds entities.
Definition: scene.cpp:47
void setTransform(std::shared_ptr< Transform > transform) noexcept
Sets the transform.
Definition: scene.cpp:10