ColumnSpawnPlacer Class
Places spawned entities in a vertical column formation. More...
Declaration
Base class
| class | SpawnPlacer |
|
Abstract interface for determining spawn positions. More... | |
Public Member Functions Index
| helios::math::vec3f | getPosition (const helios::engine::ecs::EntityHandle &entityHandle, const helios::math::aabbf &gameObjectBounds, const helios::math::aabbf &environmentBounds, const SpawnPlanCursor &cursor, const SpawnContext &spawnContext) override |
|
Calculates spawn position for a vertical column layout. More... | |
Description
Places spawned entities in a vertical column formation.
Distributes entities evenly along the Y-axis within the environment bounds. Entities are positioned at the left edge (min X) of the environment and spaced vertically based on the spawn count.
For single spawns, a random Y position is chosen within bounds. For multiple spawns, entities are evenly distributed from top to bottom.
Example layout for 4 entities: ``` ┌─────────────────────┐ │ ○ │ <- position 1 │ │ │ ○ │ <- position 2 │ │ │ ○ │ <- position 3 │ │ │ ○ │ <- position 4 └─────────────────────┘ ```
Definition at line 46 of file ColumnSpawnPlacer.ixx.
Public Member Functions
getPosition()
| inline virtual |
Calculates spawn position for a vertical column layout.
- Parameters
-
entityHandle The handle of the entity being spawned.
gameObjectBounds The AABB of the entity to spawn.
environmentBounds The AABB of the spawn environment (arena).
cursor Current position in the spawn batch.
spawnContext Additional context for spawn decisions.
- Returns
World position for the entity (left edge, vertically distributed).
Definition at line 61 of file ColumnSpawnPlacer.ixx.
References helios::math::aabb< T >::max, helios::math::aabb< T >::min, helios::engine::runtime::spawn::SpawnPlanCursor::position, helios::util::Random::randomFloat, helios::math::aabb< T >::size and helios::engine::runtime::spawn::SpawnPlanCursor::spawnCount.
The documentation for this class was generated from the following file:
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.