RandomSpawnPlacer Class
Placer that spawns entities at random positions within bounds. More...
Declaration
Base class
| class | SpawnPlacer |
|
Abstract interface for determining spawn positions. More... | |
Public Member Functions Index
| helios::math::vec3f | getPosition (const helios::util::Guid &guid, const helios::math::aabbf &bounds, const SpawnPlanCursor &cursor, const SpawnContext &spawnContext) override |
|
Returns a random position within the level bounds. More... | |
Description
Placer that spawns entities at random positions within bounds.
RandomSpawnPlacer generates random X and Y coordinates within the provided level bounds. The Z coordinate is set to 0, making this suitable for 2D games.
Uses a static Random generator with a fixed seed for reproducibility.
- See Also
Definition at line 29 of file RandomSpawnPlacer.ixx.
Public Member Functions
getPosition()
| inline virtual |
Returns a random position within the level bounds.
- Parameters
-
guid The GUID of the entity being spawned (unused).
bounds The level bounds to spawn within.
cursor The current position within the spawn batch (unused).
spawnContext Context data (unused).
- Returns
A random vec3f with Z = 0.
Definition at line 43 of file RandomSpawnPlacer.ixx.
References helios::math::aabb< T >::max and helios::math::aabb< T >::min.
The documentation for this class was generated from the following file:
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.