Skip to main content

TriggerCollisionEvent.ixx File

Event emitted when a trigger (non-physical) collision occurs. More...

Included Headers

Namespaces Index

namespacehelios
namespaceengine

Main engine module aggregating core infrastructure and game systems. More...

namespacemodules

Domain-specific components and systems. More...

namespacephysics

Physics simulation and collision detection subsystem for the game engine. More...

namespacecollision
namespaceevents

Collision event types for the helios engine. More...

Classes Index

classTriggerCollisionEvent

Event emitted when a trigger collision is detected. More...

Description

Event emitted when a trigger (non-physical) collision occurs.

File Listing

The file content with the documentation metadata removed is:

1/**
2 * @file TriggerCollisionEvent.ixx
3 * @brief Event emitted when a trigger (non-physical) collision occurs.
4 */
5module;
6
7export module helios.engine.modules.physics.collision.events.TriggerCollisionEvent;
8
9import helios.engine.ecs.EntityHandle;
10import helios.math;
11import helios.engine.modules.physics.collision.types.CollisionContext;
12import helios.core.types;
13
15
16 /**
17 * @brief Event emitted when a trigger collision is detected.
18 *
19 * Trigger collisions are non-physical interactions used for gameplay logic
20 * such as pickups, damage zones, or area effects. Unlike solid collisions,
21 * trigger collisions do not block movement. This event is published to the
22 * event bus when an entity with PassEvent behavior detects a trigger collision.
23 */
25
26 /**
27 * @brief Context data describing the collision.
28 */
30
31 /**
32 * @brief Handle of the entity that reported the collision.
33 */
35
36 public:
37
38 /**
39 * @brief Constructs a TriggerCollisionEvent.
40 *
41 * @param source Handle of the reporting entity.
42 * @param collisionContext Context data describing the collision.
43 */
47 ) : collisionContext_(collisionContext), source_(source) {}
48
49 /**
50 * @brief Returns the collision context.
51 *
52 * @return Reference to the collision context data.
53 */
54 [[nodiscard]] const collision::types::CollisionContext& collisionContext() const noexcept {
55 return collisionContext_;
56 }
57
58 /**
59 * @brief Returns the source entity handle.
60 *
61 * @return Handle of the entity that reported the collision.
62 */
63 [[nodiscard]] helios::engine::ecs::EntityHandle source() const noexcept {
64 return source_;
65 }
66
67 };
68
69}

Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.