2026-02-02 12:24:50 -08:00
|
|
|
#include "rendering/scene.hpp"
|
|
|
|
|
#include "rendering/mesh.hpp"
|
|
|
|
|
#include <algorithm>
|
|
|
|
|
|
|
|
|
|
namespace wowee {
|
|
|
|
|
namespace rendering {
|
|
|
|
|
|
|
|
|
|
void Scene::addMesh(std::shared_ptr<Mesh> mesh) {
|
2026-02-18 20:10:47 -08:00
|
|
|
meshes.push_back(std::move(mesh));
|
2026-02-02 12:24:50 -08:00
|
|
|
}
|
|
|
|
|
|
2026-02-18 20:10:47 -08:00
|
|
|
void Scene::removeMesh(const std::shared_ptr<Mesh>& mesh) {
|
2026-02-02 12:24:50 -08:00
|
|
|
auto it = std::find(meshes.begin(), meshes.end(), mesh);
|
|
|
|
|
if (it != meshes.end()) {
|
|
|
|
|
meshes.erase(it);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Scene::clear() {
|
|
|
|
|
meshes.clear();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
} // namespace rendering
|
|
|
|
|
} // namespace wowee
|