SpawnProfileConfig Class
Fluent configuration for a spawn profile bound to a pool. More...
Declaration
Public Constructors Index
| SpawnProfileConfig (SpawnPoolConfig &parent, helios::engine::runtime::spawn::SpawnManager &spawnManager, helios::engine::runtime::spawn::types::SpawnProfileId profileId, helios::engine::runtime::pooling::types::GameObjectPoolId poolId) | |
|
Constructs a SpawnProfileConfig. More... | |
Public Member Functions Index
| SpawnProfileConfig & | emitterPlacement () |
|
Configures emitter-relative placement and initialization. More... | |
| SpawnProfileConfig & | randomPlacement () |
|
Configures random placement within level bounds. More... | |
| SpawnProfileConfig & | axisPlacement (const helios::math::vec3f &axis, const helios::math::vec3f &origin) |
|
Configures axis-aligned placement. More... | |
| SpawnProfileConfig & | placer (std::unique_ptr< helios::engine::runtime::spawn::behavior::SpawnPlacer > customPlacer) |
|
Sets a custom spawn placer. More... | |
| SpawnProfileConfig & | randomDirectionInitializer () |
|
Configures a move initializer with random direction. More... | |
| SpawnProfileConfig & | moveInitializer (const helios::math::vec3f &direction) |
|
Configures a move initializer with a fixed direction. More... | |
| SpawnProfileConfig & | initializer (std::unique_ptr< helios::engine::runtime::spawn::behavior::SpawnInitializer > customInitializer) |
|
Sets a custom spawn initializer. More... | |
| SpawnRuleConfig & | scheduledBy (helios::engine::runtime::spawn::types::SpawnRuleId ruleId) |
|
Begins configuration of a scheduled spawn rule for this profile. More... | |
| helios::engine::runtime::spawn::types::SpawnProfileId | profileId () const noexcept |
|
Returns the profile ID. More... | |
| std::vector< std::pair< helios::engine::runtime::spawn::types::SpawnProfileId, std::unique_ptr< helios::engine::runtime::spawn::policy::SpawnRule > > > | commit () |
|
Commits the profile and builds any associated rules. More... | |
| SpawnPoolConfig & | done () |
|
Finalizes the profile and returns to the parent pool config. More... | |
Private Member Attributes Index
| SpawnPoolConfig & | parent_ |
|
Parent pool this profile belongs to. More... | |
| helios::engine::runtime::spawn::SpawnManager & | spawnManager_ |
|
The spawn manager to register with. More... | |
| helios::engine::runtime::spawn::types::SpawnProfileId | profileId_ |
|
Profile identifier. More... | |
| helios::engine::runtime::pooling::types::GameObjectPoolId | poolId_ |
|
Pool to acquire entities from. More... | |
| std::unique_ptr< helios::engine::runtime::spawn::behavior::SpawnPlacer > | placer_ |
|
Placement strategy for spawned entities. More... | |
| std::unique_ptr< helios::engine::runtime::spawn::behavior::SpawnInitializer > | initializer_ |
|
Initialization strategy for spawned entities. More... | |
| std::vector< std::unique_ptr< SpawnRuleConfig > > | rules_ |
|
Scheduled rules for this profile. More... | |
Description
Fluent configuration for a spawn profile bound to a pool.
Configures placement, initialization, and optional scheduling rules for a specific spawn profile. Returns to the parent SpawnPoolConfig via done().
Definition at line 225 of file SpawnPoolConfig.ixx.
Public Constructors
SpawnProfileConfig()
| inline |
Constructs a SpawnProfileConfig.
- Parameters
-
parent The parent pool config.
spawnManager The spawn manager to register profiles with.
profileId Unique identifier for the profile.
poolId Pool from which entities are acquired.
Definition at line 272 of file SpawnPoolConfig.ixx.
Reference profileId.
Referenced by axisPlacement, emitterPlacement, initializer, moveInitializer, placer, randomDirectionInitializer and randomPlacement.
Public Member Functions
axisPlacement()
| inline |
Configures axis-aligned placement.
- Parameters
-
axis Direction axis for spawn distribution.
origin Starting point of the axis.
- Returns
Reference to this config for chaining.
Definition at line 312 of file SpawnPoolConfig.ixx.
Reference SpawnProfileConfig.
commit()
| inline |
Commits the profile and builds any associated rules.
- Returns
Vector of built spawn rules (may be empty).
Definition at line 402 of file SpawnPoolConfig.ixx.
done()
| inline |
Finalizes the profile and returns to the parent pool config.
- Returns
Reference to the parent SpawnPoolConfig.
Definition at line 427 of file SpawnPoolConfig.ixx.
emitterPlacement()
| inline |
Configures emitter-relative placement and initialization.
- Returns
Reference to this config for chaining.
Definition at line 285 of file SpawnPoolConfig.ixx.
Reference SpawnProfileConfig.
initializer()
| inline |
Sets a custom spawn initializer.
- Parameters
-
customInitializer Ownership is transferred.
- Returns
Reference to this config for chaining.
Definition at line 367 of file SpawnPoolConfig.ixx.
Reference SpawnProfileConfig.
moveInitializer()
| inline |
Configures a move initializer with a fixed direction.
- Parameters
-
direction The movement direction.
- Returns
Reference to this config for chaining.
Definition at line 354 of file SpawnPoolConfig.ixx.
Reference SpawnProfileConfig.
placer()
| inline |
Sets a custom spawn placer.
- Parameters
-
customPlacer Ownership is transferred.
- Returns
Reference to this config for chaining.
Definition at line 328 of file SpawnPoolConfig.ixx.
Reference SpawnProfileConfig.
profileId()
| inline nodiscard noexcept |
Returns the profile ID.
- Returns
The spawn profile ID.
Definition at line 391 of file SpawnPoolConfig.ixx.
Referenced by SpawnProfileConfig.
randomDirectionInitializer()
| inline |
Configures a move initializer with random direction.
- Returns
Reference to this config for chaining.
Definition at line 340 of file SpawnPoolConfig.ixx.
References helios::engine::runtime::spawn::behavior::initializers::Random and SpawnProfileConfig.
randomPlacement()
| inline |
Configures random placement within level bounds.
- Returns
Reference to this config for chaining.
Definition at line 298 of file SpawnPoolConfig.ixx.
Reference SpawnProfileConfig.
scheduledBy()
| inline |
Begins configuration of a scheduled spawn rule for this profile.
- Parameters
-
ruleId Unique identifier for the rule.
- Returns
Reference to the new rule config for chaining.
Definition at line 381 of file SpawnPoolConfig.ixx.
Private Member Attributes
initializer_
|
Initialization strategy for spawned entities.
Definition at line 255 of file SpawnPoolConfig.ixx.
parent_
|
Parent pool this profile belongs to.
Definition at line 230 of file SpawnPoolConfig.ixx.
placer_
|
Placement strategy for spawned entities.
Definition at line 250 of file SpawnPoolConfig.ixx.
poolId_
|
Pool to acquire entities from.
Definition at line 245 of file SpawnPoolConfig.ixx.
profileId_
|
Profile identifier.
Definition at line 240 of file SpawnPoolConfig.ixx.
rules_
|
Scheduled rules for this profile.
Definition at line 260 of file SpawnPoolConfig.ixx.
spawnManager_
|
The spawn manager to register with.
Definition at line 235 of file SpawnPoolConfig.ixx.
The documentation for this class was generated from the following file:
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.