diff options
Diffstat (limited to 'src/engine/graphics/scene.cpp')
-rw-r--r-- | src/engine/graphics/scene.cpp | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/engine/graphics/scene.cpp b/src/engine/graphics/scene.cpp index 9f561f0..e0f4da6 100644 --- a/src/engine/graphics/scene.cpp +++ b/src/engine/graphics/scene.cpp @@ -8,7 +8,6 @@ #include <iostream> #include <sys/ioctl.h> -#include <utility> Scene::Scene( IMatrixFactory<MatrixElement> matrix_factory, @@ -84,3 +83,17 @@ auto Scene::get_matrix() const noexcept -> const std::shared_ptr<IMatrix<MatrixE { return _matrix; } + +void Scene::register_component( + const std::shared_ptr<IComponent> &component, + const Vector2 &position) noexcept +{ + _components.emplace_back(std::make_pair(component, position)); +} + +auto Scene::get_components() const noexcept + -> std::vector<std::pair<std::shared_ptr<IComponent>, Vector2>> +{ + return _components; +} + |