Plasma Engine  2.0
Loading...
Searching...
No Matches
WorldDesc.h
1#pragma once
2
3#include <Foundation/Strings/HashedString.h>
4#include <Foundation/Types/SharedPtr.h>
5#include <Foundation/Types/UniquePtr.h>
6
7#include <Core/World/CoordinateSystem.h>
8#include <Core/World/SpatialSystem.h>
9
11
14{
15 PL_DECLARE_POD_TYPE();
16
17 plWorldDesc(plStringView sWorldName) { m_sName.Assign(sWorldName); }
18
19 plHashedString m_sName;
20 plUInt64 m_uiRandomNumberGeneratorSeed = 0;
21
22 plUniquePtr<plSpatialSystem> m_pSpatialSystem;
24
25 plSharedPtr<plCoordinateSystemProvider> m_pCoordinateSystemProvider;
27
28 bool m_bReportErrorWhenStaticObjectMoves = true;
29
30 plTime m_MaxComponentInitializationTimePerFrame = plTime::MakeFromHours(10000); // max time to spend on component initialization per frame
31};
This class is optimized to take nearly no memory (sizeof(void*)) and to allow very fast checks whethe...
Definition HashedString.h:25
void Assign(const char(&string)[N])
Assigning a new string from a string constant is a slow operation, but the hash computation can happe...
A Shared ptr manages a shared object and destroys that object when no one references it anymore....
Definition SharedPtr.h:10
plStringView represent a read-only sub-string of a larger string, as it can store a dedicated string ...
Definition StringView.h:34
Base class for all time step smoothing algorithms.
Definition Clock.h:175
A Unique ptr manages an object and destroys that object when it goes out of scope....
Definition UniquePtr.h:10
The time class encapsulates a double value storing the time in seconds.
Definition Time.h:12
PL_ALWAYS_INLINE static constexpr plTime MakeFromHours(double fHours)
Creates an instance of plTime that was initialized from hours.
Definition Time.h:38
Describes the initial state of a world.
Definition WorldDesc.h:14
bool m_bAutoCreateSpatialSystem
automatically create a default spatial system if none is set
Definition WorldDesc.h:23
plUniquePtr< plTimeStepSmoothing > m_pTimeStepSmoothing
if nullptr, plDefaultTimeStepSmoothing will be used
Definition WorldDesc.h:26