|
| auto | VersionForEntity (entity_id_t id) const |
| |
| bool | CorrectVersion (entity_t id) const |
| |
| void | SetEntityRenderlayer (entity_t globalid, renderlayer_t layers) |
| |
| void | SetEntityAttributes (entity_t globalid, perobject_t attributes) |
| |
| perobject_t | GetEntityAttributes (entity_t globalid) |
| |
| template<typename T , typename ... A> |
| T | Instantiate (A &&... args) |
| |
| template<typename func > |
| void | Filter (func &&f) |
| |
| template<typename func > |
| void | FilterPolymorphic (func &&f) |
| |
|
template<typename func_t > |
| void | EnumerateComponentsOn (entity_t local_id, const func_t &fn) |
| |
| template<typename T , typename U > |
| void | CreateDependency () |
| |
| template<typename T > |
| void | RemoveSystem () |
| |
| template<typename T , typename ... Args> |
| auto | EmplaceSystem (Args &&... args) |
| |
| template<typename T , typename interval_t , typename ... Args> |
| auto | EmplaceTimedSystem (const interval_t interval, Args &&... args) |
| |
| template<typename T , typename ... Args> |
| auto | EmplacePolymorphicSystem (Args &&... args) |
| |
| template<typename T , typename interval_t , typename ... Args> |
| auto | EmplacePolymorphicTimedSystem (const interval_t interval, Args &&... args) |
| |
| template<typename T , typename ... Args> |
| auto | EmplaceSerialSystem (Args &&... args) |
| |
| template<typename T , typename interval_t , typename ... Args> |
| auto | EmplaceSerialTimedSystem (const interval_t interval, Args &&... args) |
| |
| template<typename T , typename ... Args> |
| auto | EmplaceSerialPolymorphicSystem (Args &&... args) |
| |
| template<typename T , typename interval_t , typename ... Args> |
| auto | EmplaceSerialPolymorphicTimedSystem (const interval_t interval, Args &&... args) |
| |
|
const auto & | getTypeToSystem () const |
| |
| template<typename T > |
| T & | GetComponent () |
| |
| float | GetCurrentFPSScale () const |
| |
| void | ExportTaskGraph (std::ostream &out) |
| |
| bool | InitPhysics () |
| |
| void | Tick (float) |
| |
| | World (const std::string &name) |
| |
| | World (const decltype(skybox)&sk) |
| |
|
void | PlaySound (const InstantaneousAudioSource &ias) |
| |
|
void | PlayAmbientSound (const InstantaneousAmbientAudioSource &iaas) |
| |
| void | DeallocatePhysics () |
| |
| virtual void | OnActivate () |
| |
| virtual void | OnDeactivate () |
| |
| void | DispatchAsync (const Function< void(void)> &func, double delaySeconds) |
| |
| template<typename T > |
| auto | GetAllComponentsOfType () |
| |
|
|
Ref< Skybox > | skybox |
| |
|
std::string_view | worldID { worldIDbuf,id_size } |
| |
|
std::atomic< bool > | newFrame = false |
| |
◆ World() [1/2]
| RavEngine::World::World |
( |
const std::string & |
name | ) |
|
|
inline |
Constructor useful for setting the world name
- Parameters
-
| name | the string name for this world. Note that if the name has more characters than id_size, only the first id_size characters will be included. |
◆ World() [2/2]
Constructor that takes a custom skybox. This constructor will bypass loading the default skybox.
- Parameters
-
◆ CorrectVersion()
- Returns
- true if the entity handle has the correct version (is not stale), false otherwise.
◆ CreateDependency()
| void RavEngine::World::CreateDependency |
( |
| ) |
|
|
inline |
Specify a dependency. T depends on U
◆ DeallocatePhysics()
| void World::DeallocatePhysics |
( |
| ) |
|
|
inline |
Called by GameplayStatics when the final world is being deallocated
◆ DispatchAsync()
| void World::DispatchAsync |
( |
const Function< void(void)> & |
func, |
|
|
double |
delaySeconds |
|
) |
| |
Dispatch a function to run in a given number of seconds in the future
- Parameters
-
| func | the function to run |
| delaySeconds | the delay in the future to run |
- Note
- You must ensure data your function references is kept loaded when this function runs. For example, to keep an entity loaded, capture by value an owning pointer to it. In addition, do not make assumptions about what thread your dispatched function runs on.
◆ EmplacePolymorphicSystem()
| auto RavEngine::World::EmplacePolymorphicSystem |
( |
Args &&... |
args | ) |
|
|
inline |
Instantiate a parallel system that performs polymorphic queries to get component data. T is the class/struct type of the system.
- Parameters
-
| args | values to pass to the system constructor |
◆ EmplacePolymorphicTimedSystem()
| auto RavEngine::World::EmplacePolymorphicTimedSystem |
( |
const interval_t |
interval, |
|
|
Args &&... |
args |
|
) |
| |
|
inline |
Instantiate a parallel system that performs polymorphic queries to get component data, and runs on an interval. T is the class/struct type of the system.
- Note
- The interval is is not a guarentee. I the engine is running too slowly to satisfy the interval, it will be called on a best-effort basis.
- Parameters
-
| args | values to pass to the system constructor |
◆ EmplaceSerialPolymorphicSystem()
| auto RavEngine::World::EmplaceSerialPolymorphicSystem |
( |
Args &&... |
args | ) |
|
|
inline |
Instantiate a parallel system that performs polymorphic queries to get component data. T is the class/struct type of the system.
- Parameters
-
| args | values to pass to the system constructor |
◆ EmplaceSerialPolymorphicTimedSystem()
| auto RavEngine::World::EmplaceSerialPolymorphicTimedSystem |
( |
const interval_t |
interval, |
|
|
Args &&... |
args |
|
) |
| |
|
inline |
Instantiate a parallel system that performs polymorphic queries to get component data, and runs on an interval. T is the class/struct type of the system.
- Note
- The interval is is not a guarentee. I the engine is running too slowly to satisfy the interval, it will be called on a best-effort basis.
- Parameters
-
| args | values to pass to the system constructor |
◆ EmplaceSerialSystem()
| auto RavEngine::World::EmplaceSerialSystem |
( |
Args &&... |
args | ) |
|
|
inline |
Instantiate a parallel system. T is the class/struct type of the system.
- Parameters
-
| args | values to pass to the system constructor |
◆ EmplaceSerialTimedSystem()
Instantiate a parallel system that runs on an interval. T is the class/struct type of the system.
- Note
- The interval is is not a guarentee. I the engine is running too slowly to satisfy the interval, it will be called on a best-effort basis.
- Parameters
-
| interval | the frequency of execution of the system. |
| args | values to pass to the system constructor |
◆ EmplaceSystem()
| auto RavEngine::World::EmplaceSystem |
( |
Args &&... |
args | ) |
|
|
inline |
Instantiate a parallel system. T is the class/struct type of the system.
- Parameters
-
| args | values to pass to the system constructor |
◆ EmplaceTimedSystem()
Instantiate a parallel system that runs on an interval. T is the class/struct type of the system.
- Note
- The interval is is not a guarentee. I the engine is running too slowly to satisfy the interval, it will be called on a best-effort basis.
- Parameters
-
| interval | the frequency of execution of the system. |
| args | values to pass to the system constructor |
◆ ExportTaskGraph()
| void RavEngine::World::ExportTaskGraph |
( |
std::ostream & |
out | ) |
|
|
inline |
Log the task graph in graphivz format.
◆ Filter()
| void RavEngine::World::Filter |
( |
func && |
f | ) |
|
|
inline |
Iterate the world, invoking a function for all entities with the requested components
- Parameters
-
| f | the function to invoke. The parameters of are the types used to query the scene |
◆ FilterPolymorphic()
| void RavEngine::World::FilterPolymorphic |
( |
func && |
f | ) |
|
|
inline |
Iterate the world, invoking a function for all entities with the requested components via a polymoprhic query.
- Parameters
-
| f | the function to invoke. The parameters of are the types used to query the scene |
◆ GetAllComponentsOfType()
| auto RavEngine::World::GetAllComponentsOfType |
( |
| ) |
|
|
inline |
- Returns
- the internal data structure storing all components of a given type.
- Note
- Do not assume ordering of components within the structure.
◆ GetComponent()
| T & RavEngine::World::GetComponent |
( |
| ) |
|
|
inline |
- Returns
- the "first" of a component type. Do not make assumptions regarding ordering of components.
◆ GetCurrentFPSScale()
| float RavEngine::World::GetCurrentFPSScale |
( |
| ) |
const |
|
inline |
- Returns
- the current tick scale factor. If the engine is running above expected speed, this value will be (0,1). If the engine is running below expected speed, this value will be > 1.
◆ GetEntityAttributes()
| perobject_t World::GetEntityAttributes |
( |
entity_t |
globalid | ) |
|
- Parameters
-
- Returns
- the per-object rendering attributes bitmask
◆ InitPhysics()
| bool RavEngine::World::InitPhysics |
( |
| ) |
|
Initializes the physics-related Systems.
- Returns
- true if the systems were loaded, false if they were not loaded because they are already loaded
◆ Instantiate()
| T RavEngine::World::Instantiate |
( |
A &&... |
args | ) |
|
|
inline |
Add an entity of type
to the world. Invokes the
function of T.
- Parameters
-
| args | parameters to pass to |
- Returns
- a handle to the constructed entity.
◆ OnActivate()
| virtual void RavEngine::World::OnActivate |
( |
| ) |
|
|
inlinevirtual |
Called when this world is made the active world for the App
◆ OnDeactivate()
| virtual void RavEngine::World::OnDeactivate |
( |
| ) |
|
|
inlinevirtual |
Called when this world was the active world for the App but has been replaced by a different world
◆ PostTick()
Called after physics and rendering synchronously
- Parameters
-
| fpsScale | the scale factor calculated |
◆ PreTick()
Called before ticking components and entities synchronously
- Parameters
-
| fpsScale | the scale factor calculated |
◆ RemoveSystem()
| void RavEngine::World::RemoveSystem |
( |
| ) |
|
|
inline |
Remove a system from the world by type.
◆ SetEntityAttributes()
| void World::SetEntityAttributes |
( |
entity_t |
globalid, |
|
|
perobject_t |
attributes |
|
) |
| |
Specify per-object rendering attributes
- Parameters
-
| globalid | the entity ID |
| layers | the attribute bitmask |
◆ SetEntityRenderlayer()
| void World::SetEntityRenderlayer |
( |
entity_t |
globalid, |
|
|
renderlayer_t |
layers |
|
) |
| |
Specify render layers for an entity
- Parameters
-
| globalid | the entity ID |
| layers | the render layer bitmask |
◆ Tick()
| void RavEngine::World::Tick |
( |
float |
scale | ) |
|
Evaluate the world given a scale factor. One tick = 1/GetApp()->EvalNormal
- Parameters
-
| the | tick fraction to evaluate |
- Note
- the GameplayStatics CurrentWorld is ticked automatically in the App
◆ TickECS()
| void RavEngine::World::TickECS |
( |
float |
fpsScale | ) |
|
|
protected |
Tick all of the objects in the world, multithreaded
- Parameters
-
| fpsScale | the scale factor to apply to all operations based on the frame rate |
◆ VersionForEntity()
| auto RavEngine::World::VersionForEntity |
( |
entity_id_t |
id | ) |
const |
|
inline |
- Returns
- the internal "Version" of the entity. This is for detecting use-after-destroy bugs.
The documentation for this class was generated from the following files:
- RavEngine/include/RavEngine/World.hpp
- RavEngine/src/World.cpp