System responsible for managing all active cameras belonging to this world, tracking and updating associated projection and view matrices.
More...
#include <camera_system.hpp>
|
| CameraSystem (std::weak_ptr< ECSWorld > world) |
| Construct a new CameraSystem object.
|
|
void | updateActiveCameraMatrices () |
| Updates all matrices associated with active cameras in this world per their properties and positions.
|
|
|
static std::string | getSystemTypeName () |
| Returns the ECS system type string for this object.
|
|
|
void | onEntityEnabled (EntityID entityID) override |
| Adds enabled entity to the projection update and view update queues.
|
|
void | onEntityDisabled (EntityID entityID) override |
| Removes extra entity related structures from system bookkeeping, if necessary.
|
|
void | onEntityUpdated (EntityID entityID) override |
| Adds entity to projection and view update queues.
|
|
void | onSimulationActivated () override |
| Initializes the CameraSystem, querying and adding all eligible entities to update queues.
|
|
void | onPreRenderStep (float simulationProgress) override |
| The step in which new projection and view matrices are actually computed for all active cameras.
|
|
|
std::set< EntityID > | mProjectionUpdateQueue {} |
| Entities whose camera properties were updated this frame, whose projection matrix should be recomputed as soon as possible.
|
|
std::set< EntityID > | mViewUpdateQueue {} |
| Entities whose position or rotation were updated this frame, whose view matrix should be recomputed as soon as possible.
|
|
System responsible for managing all active cameras belonging to this world, tracking and updating associated projection and view matrices.
◆ CameraSystem()
ToyMaker::CameraSystem::CameraSystem |
( |
std::weak_ptr< ECSWorld > | world | ) |
|
|
inlineexplicit |
Construct a new CameraSystem object.
- Parameters
-
world | The world to which this system belongs. |
◆ getSystemTypeName()
static std::string ToyMaker::CameraSystem::getSystemTypeName |
( |
| ) |
|
|
inlinestatic |
Returns the ECS system type string for this object.
- Returns
- std::string This system's ECS system type string.
- See also
- ECSWorld::registerSystem()
◆ onEntityDisabled()
void CameraSystem::onEntityDisabled |
( |
EntityID | entityID | ) |
|
|
overrideprivate |
Removes extra entity related structures from system bookkeeping, if necessary.
- Parameters
-
◆ onEntityEnabled()
void CameraSystem::onEntityEnabled |
( |
EntityID | entityID | ) |
|
|
overrideprivate |
◆ onEntityUpdated()
void CameraSystem::onEntityUpdated |
( |
EntityID | entityID | ) |
|
|
overrideprivate |
Adds entity to projection and view update queues.
- Parameters
-
entityID | The entity that was updated |
◆ onPreRenderStep()
void CameraSystem::onPreRenderStep |
( |
float | simulationProgress | ) |
|
|
overrideprivate |
The step in which new projection and view matrices are actually computed for all active cameras.
- Parameters
-
simulationProgress | The progress since the end of the last simulation update to the start of the next one, as a number between 0 and 1. |
The documentation for this class was generated from the following files: