CollisionStateResponseSystem.ixx File
System for processing collision states and executing collision behaviors. More...
Included Headers
#include <algorithm>
#include <cassert>
#include <cmath>
#include <format>
#include <helios/helios_config.h>
#include <unordered_set>
#include <vector>
#include <helios.engine.mechanics.lifecycle.components.Active>
#include <helios.engine.mechanics.spawn.components.SpawnedByProfileComponent>
#include <helios.engine.modules.physics.collision.events>
#include <helios.engine.runtime.spawn.commands.DespawnCommand>
#include <helios.engine.modules.physics.collision.components.CollisionStateComponent>
#include <helios.engine.modules.physics.collision.types.CollisionBehavior>
#include <helios.engine.runtime.messaging.command.CommandBuffer>
#include <helios.engine.ecs.System>
#include <helios.engine.runtime.world.UpdateContext>
#include <helios.engine.runtime.world.GameWorld>
Namespaces Index
| namespace | helios |
| namespace | engine |
|
Main engine module aggregating core infrastructure and game systems. More... | |
| namespace | modules |
|
Domain-specific components and systems. More... | |
| namespace | physics |
|
Physics simulation and collision detection subsystem for the game engine. More... | |
| namespace | collision |
| namespace | systems |
|
Collision detection and response systems. More... | |
Classes Index
| class | CollisionStateResponseSystem |
|
System that processes collision states and executes configured behaviors. More... | |
Description
System for processing collision states and executing collision behaviors.
File Listing
The file content with the documentation metadata removed is:
35using namespace helios::engine::modules::physics::collision::components;
36using namespace helios::engine::modules::physics::collision::types;
37using namespace helios::engine::runtime::spawn::commands;
40export namespace helios::engine::modules::physics::collision::systems {
58 class CollisionStateResponseSystem : public helios::engine::ecs::System {
71 void update(helios::engine::runtime::world::UpdateContext& updateContext) noexcept override {
73 for (auto [entity, csc, sbp, active] : gameWorld_->view<
83 CollisionBehavior collisionBehavior = csc->collisionBehavior();
85 if (hasFlag(collisionBehavior, CollisionBehavior::PassEvent)) {
88 updateContext.pushPass<events::TriggerCollisionEvent>(
95 updateContext.pushPass<events::SolidCollisionEvent>(
103 if (hasFlag(collisionBehavior, CollisionBehavior::Despawn)) {
104 updateContext.commandBuffer().add<DespawnCommand>(
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.