Game of Ur 0.3.3
This is a computer adaptation of Game of Ur, written in C++ mainly using SDL and OpenGL.
Loading...
Searching...
No Matches
ToyMaker::SpatialQuerySystem::LightBoundsComputeSystem Class Reference

A subsystem of the spatial query system responsible for tracking light volumes and recomputing their ObjectBounds accordingly. More...

#include <spatial_query_system.hpp>

Inheritance diagram for ToyMaker::SpatialQuerySystem::LightBoundsComputeSystem:
ToyMaker::System< LightBoundsComputeSystem, std::tuple< LightEmissionData >, std::tuple< ObjectBounds > >

Public Member Functions

 LightBoundsComputeSystem (std::weak_ptr< ECSWorld > world)
 

Static Public Member Functions

static std::string getSystemTypeName ()
 Gets the system type string associated with this class.
 

Private Member Functions

void onEntityEnabled (EntityID entityID) override
 Updates a light entity's bounds when it has just been made active.
 
void onEntityUpdated (EntityID entityID) override
 Updates a light entity's bounds when its position or emissive properties were updated.
 
void recomputeObjectBounds (EntityID entityID)
 The method responsible for actually recomputing the light entity's object bounds.
 

Detailed Description

A subsystem of the spatial query system responsible for tracking light volumes and recomputing their ObjectBounds accordingly.

Todo
This sort of makes it so that an object with LightEmissionData and StaticModel components gets conflicting results for ObjectBounds. Do we want to allow entities to have both? If not, should we do something to explicitly prevent it?

Member Function Documentation

◆ getSystemTypeName()

static std::string ToyMaker::SpatialQuerySystem::LightBoundsComputeSystem::getSystemTypeName ( )
inlinestatic

Gets the system type string associated with this class.

Returns
std::string This system's system type string.

◆ onEntityEnabled()

void SpatialQuerySystem::LightBoundsComputeSystem::onEntityEnabled ( EntityID entityID)
overrideprivate

Updates a light entity's bounds when it has just been made active.

Parameters
entityIDThe entity that was just made active.

◆ onEntityUpdated()

void SpatialQuerySystem::LightBoundsComputeSystem::onEntityUpdated ( EntityID entityID)
overrideprivate

Updates a light entity's bounds when its position or emissive properties were updated.

Parameters
entityIDThe light entity being updated.

◆ recomputeObjectBounds()

void SpatialQuerySystem::LightBoundsComputeSystem::recomputeObjectBounds ( EntityID entityID)
private

The method responsible for actually recomputing the light entity's object bounds.

Parameters
entityIDThe entity ID of the object.

The documentation for this class was generated from the following files: