wren
Vulkan-based game engine
Loading...
Searching...
No Matches
scene.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <flecs.h>
4
5#include <memory>
6
7namespace wren::scene {
8
9class Entity;
10
11class Scene : public std::enable_shared_from_this<Scene> {
12 public:
13 static auto create() { return std::shared_ptr<Scene>(new Scene()); }
14
15 auto create_entity(const std::string& name = "entity") -> flecs::entity;
16
17 auto world() const -> const flecs::world& { return ecs_; }
18 auto world() -> flecs::world& { return ecs_; }
19
20 private:
21 Scene() = default;
22
23 flecs::world ecs_;
24};
25
26} // namespace wren::scene
Definition scene.hpp:11
auto create_entity(const std::string &name="entity") -> flecs::entity
Definition scene.cpp:9
auto world() const -> const flecs::world &
Definition scene.hpp:17
flecs::world ecs_
Definition scene.hpp:23
static auto create()
Definition scene.hpp:13
auto world() -> flecs::world &
Definition scene.hpp:18
Definition components.cpp:3