Skip to main content

EmitterContext Struct

Context data from the entity that triggered a spawn operation. More...

Declaration

struct helios::engine::runtime::spawn::types::EmitterContext { ... }

Public Member Attributes Index

const helios::math::vec3fposition

World position of the emitting entity. More...

const helios::math::vec3fvelocity

Velocity of the emitting entity at spawn time. More...

const helios::engine::ecs::EntityHandlesource

Handle of the entity that is responsible for this EmitterContext. More...

Description

Context data from the entity that triggered a spawn operation.

EmitterContext captures the state of the emitting entity at the moment a spawn is requested. This allows spawned entities to inherit properties from their source (e.g., projectiles inheriting velocity).

Example usage: ```cpp EmitterContext ctx{ .position = spaceship->position(), .velocity = spaceship->velocity() }; spawnContext.emitterContext = ctx; ```

See Also

SpawnContext

See Also

SpawnCommand

Definition at line 35 of file EmitterContext.ixx.

Public Member Attributes

position

const helios::math::vec3f helios::engine::runtime::spawn::types::EmitterContext::position

World position of the emitting entity.

Definition at line 40 of file EmitterContext.ixx.

source

const helios::engine::ecs::EntityHandle helios::engine::runtime::spawn::types::EmitterContext::source

Handle of the entity that is responsible for this EmitterContext.

Definition at line 50 of file EmitterContext.ixx.

velocity

const helios::math::vec3f helios::engine::runtime::spawn::types::EmitterContext::velocity

Velocity of the emitting entity at spawn time.

Definition at line 45 of file EmitterContext.ixx.


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


Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.