Epok Engine

EPOK RUNTIME

epok::effects::spawn

Function · 1 overload

Function

Performs `spawn` as part of runtime effects and their deterministic playback state.

Belongs to
epok::effects
Header
particle_effect_service.hpp
Overloads
1

Declaration

Declaration
inline Handle spawn(const Asset& asset,const Transform& transform,uint32_t seed=0,DataHandle owner={},const timeline::BoundTarget* bindings=nullptr)

Performs `spawn` as part of runtime effects and their deterministic playback state.

ParameterTypeMeaning
assetconst Asset &Value supplied for asset. Keep referenced or pointed-to data valid for the complete call.
transformconst Transform &Value supplied for transform. Keep referenced or pointed-to data valid for the complete call.
seeduint32_tValue supplied for seed. Keep referenced or pointed-to data valid for the complete call.
ownerDataHandleValue supplied for owner. Keep referenced or pointed-to data valid for the complete call.
bindingsconst timeline::BoundTarget *Value supplied for bindings. Keep referenced or pointed-to data valid for the complete call.

Returns: Handle. Check the value before continuing when it represents success, availability or a resource handle.

Example

C++ example
#include "particle_effect_service.hpp"

// Assume these named values have been initialized with valid data:
// const Asset & asset
// const Transform & transform
// uint32_t seed
// DataHandle owner
// const timeline::BoundTarget * bindings

auto result = epok::effects::spawn(asset, transform, seed, owner, bindings);

Why use it

It provides direct, allocation-conscious access to runtime effects and their deterministic playback state. No exception-based error path is implied by the signature.

Trade-offs and warnings

Pointer/reference arguments are borrowed unless the source contract says otherwise; keep them valid for the complete operation and never assume null is accepted.

Declared in runtime/particle_effect_service.hpp:44

Related members