NcEngine
Scene.h
Go to the documentation of this file.
1
5#pragma once
6
9#include "ncmath/Vector.h"
10
11#include <filesystem>
12#include <memory>
13
14namespace nc
15{
16class Registry;
17
18constexpr float MinExtentDimension = 1.0f;
19class Scene
20{
21 public:
22 Scene(Vector3 extents = Vector3{150.0f, 150.0f, 150.0f})
23 : m_extents{Vector3{std::max(MinExtentDimension, extents.x), std::max(MinExtentDimension, extents.y), std::max(MinExtentDimension, extents.z)}}
24 {}
25
26 virtual ~Scene() = default;
27
31 virtual void Load(ecs::Ecs world, ModuleProvider modules) = 0;
32
36 virtual void Unload() {}
37
42 auto GetExtents() const noexcept -> const Vector3& { return m_extents; };
43
44 private:
45 Vector3 m_extents;
46};
47} // namespace nc
Provides access to registered Modules.
Definition: ModuleProvider.h:15
Definition: Scene.h:20
auto GetExtents() const noexcept -> const Vector3 &
Get the scene extents, which are used to determine lighting bounds.
Definition: Scene.h:42
virtual void Load(ecs::Ecs world, ModuleProvider modules)=0
Handle to put any logic to occur on scene load.
virtual void Unload()
Handle to put any logic to occur on scene unload.
Definition: Scene.h:36
Interface for higher-level entity and component operations with optional type access restriction.
Definition: Ecs.h:18
A three component vector.
Definition: Vector.h:29