Skip to main content

CollisionStateClearSystem Class

System that clears collision state components at the end of each frame. More...

Declaration

class helios::engine::modules::physics::collision::systems::CollisionStateClearSystem { ... }

Base class

classSystem

Abstract base class for game systems. More...

Public Member Functions Index

voidupdate (helios::engine::runtime::world::UpdateContext &updateContext) noexcept override

Resets collision state for all entities with CollisionStateComponent. More...

Description

System that clears collision state components at the end of each frame.

This system iterates over all entities with a CollisionStateComponent and resets their collision state. It should run in the post-phase of the game loop to ensure collision data from the current frame does not persist into the next frame.

Running this system after collision response systems have processed their events ensures a clean slate for the next collision detection pass.

Definition at line 50 of file CollisionStateClearSystem.ixx.

Public Member Functions

update()

void helios::engine::modules::physics::collision::systems::CollisionStateClearSystem::update (helios::engine::runtime::world::UpdateContext & updateContext)
inline noexcept virtual

Resets collision state for all entities with CollisionStateComponent.

Parameters
updateContext

Context containing frame data and world access.

Definition at line 59 of file CollisionStateClearSystem.ixx.

59 void update(helios::engine::runtime::world::UpdateContext& updateContext) noexcept override {
60 for (auto [entity, csc, active] : gameWorld_->view<
63 >().whereEnabled()) {
64 csc->reset();
65 }
66 }

Reference helios::engine::ecs::System::gameWorld_.


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


Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.