152 template<
typename E,
typename... Args> [[
nodiscard]]
inline E create(Args&&... args);
#define CE_ENTITY_OBJECT_HASH(T)
Definition Entity.hpp:784
#define CE_REFLECT_HASH(T)
Definition Hash.hpp:89
#define CE_REFL_DATA_GETSET(N, G, S)
Definition Macros.hpp:549
#define CE_REFL_DATA(N)
Definition Macros.hpp:541
#define CE_META_CLASS_FRIEND(T)
Definition Forward.hpp:48
Definition Camera.hpp:247
The base entity class.
Definition Entity.hpp:41
E createWith(Block &&block, Args &&... args)
Creates a new entity object with type E.
Entity create(const Entity &parent=nullEntity, String name={})
Creates a new entity.
void update()
A method that must be called every frame by the engine to trigger runtime events.
A generator represents a coroutine type that produces a sequence of values of type T,...
Definition Generator.hpp:50
A scene light.
Definition Light.hpp:275
Definition Renderable.hpp:109
T * get() const noexcept
Definition ResourceHandle.hpp:231
A resource that stores scene information.
Definition Scene.hpp:83
static Scene * find(const SceneObject &sceneObject)
Finds the scene that a scene object is attached to.
Renderable createRenderable()
Creates a new renderable on the scene.
const RendererSceneSettings & getRendererSettings() const
Definition Scene.hpp:123
World & getWorld() noexcept
The Entity-Component system world.
Definition Scene.hpp:200
static constexpr void reflect(Processor &&RTTI)
Executes the given processor for every field of the struct.
Definition Scene.hpp:215
Entity copyObjects(Scene &otherScene, const Entity &parent=nullptr)
Copies the objects from another scene.
World mWorld
The Entity-Component system world.
Definition Scene.hpp:94
void setSettings(const SceneSettings &settings)
RendererSceneSettings mRendererSettings
A set of settings that should be used by renderer when rendering the scene.
Definition Scene.hpp:101
Light createLight()
Creates a new light on the scene.
Vector< SceneObject > create(UInt32 n)
Creates n empty SceneObjects.
Camera createCamera()
Creates a new camera on the scene.
SceneSettings mSettings
A structure that contains settings for the scene.
Definition Scene.hpp:97
~Scene() noexcept override
const SceneSettings & getSettings() const
Definition Scene.hpp:117
E createWith(Block &&block, Args &&... args)
Creates a new SceneObject with type E.
Definition Scene.hpp:225
Generator< SceneObject > enumerateChildren() const
Enumerates all children scene objects.
void update(const double dt)
Runs a single simulation step on the world.
Definition Scene.hpp:110
decltype(auto) updateRendererSettings(Func &&func) noexcept
Definition Scene.hpp:129
SceneObject create()
Creates a new empty SceneObject.
const World & getWorld() const noexcept
The Entity-Component system world.
Definition Scene.hpp:203
void setRendererSettings(const RendererSceneSettings &rendererSettings)
SceneManager * mSceneManager
The scene manager this scene is registered to, if registered.
Definition Scene.hpp:90
A manager that references and manages mutliple scenes.
Definition Scene.hpp:230
void remove(Scene *const scene)
Removes a scene from the manager.
void remove(const ScenePtr &scene)
Adds a new scene to the manager.
Definition Scene.hpp:251
void remove(const HScene &scene)
Removes a scene from the manager.
Definition Scene.hpp:248
Vector< Scene * > mScenes
A vector of all registered scenes.
Definition Scene.hpp:235
void add(const ScenePtr &scene)
Adds a new scene to the manager.
Definition Scene.hpp:242
void add(Scene *const scene)
Adds a new scene to the manager.
void simulate(double dt)
Simulates all scenes registered.
void add(const HScene &scene)
Adds a new scene to the manager.
Definition Scene.hpp:239
void update(double time)
Updates all systems.
Utility template class that can be extended by Resources to automatically implement methods that are ...
Definition Resource.hpp:272
SystemManager systems
The world system manager.
Definition World.hpp:34
EntityManager entities
The world entity manager.
Definition World.hpp:30
Definition Application.hpp:19
std::vector< T, ScopedAllocatorAdaptor< StdAllocator< T, RawAllocator > > > Vector
Vector is a sequence container that encapsulates dynamic size arrays.
Definition Vector.hpp:17
auto parent(const Entity &parent)
Sets the entity parent.
Definition Helpers.hpp:52
SPtr< Scene > ScenePtr
Definition Forward.hpp:16
std::uint32_t UInt32
Definition DataTypes.hpp:23
constexpr size_t hash(const T &v)
Generates a hash for the provided type.
Definition Hash.hpp:25
A structure that holds renderer-specific settings for a Scene.
Definition RendererSceneSettings.hpp:15
A structure that contains settings for the scene.
Definition Scene.hpp:71
static constexpr void reflect(Processor &&RTTI)
Executes the given processor for every field of the struct.
Definition Scene.hpp:78
ShadowSettings shadowSettings
Various options that control shadow rendering for a specific view.
Definition Scene.hpp:73
Definition ScopeExit.hpp:15
Various options that control shadow rendering for a specific view.
Definition Scene.hpp:30
static constexpr void reflect(Processor &&RTTI)
Executes the given processor for every field of the struct.
Definition Scene.hpp:62
double cascadeDistributionExponent
Allows you to control how are directional shadow cascades distributed.
Definition Scene.hpp:52
UInt32 shadowFilteringQuality
Determines the number of samples used for percentage closer shadow map filtering.
Definition Scene.hpp:57
double directionalShadowDistance
Maximum distance that directional light shadows are allowed to render at.
Definition Scene.hpp:35
UInt32 numberOfCascades
Number of cascades to use for directional shadows.
Definition Scene.hpp:42