|
| Wiring & | bind () |
| | Call the entity's influence function once immediately.
|
| |
| Wiring & | bind (std::function< void()> attach, std::function< void()> detach) |
| | Call attach immediately; call detach after for_duration expires or on explicit cancel().
|
| |
| Wiring & | bind (std::function< void()> fn) |
| | Call a custom function once immediately instead of the entity's own.
|
| |
| Wiring & | bind (std::string attach_name, std::function< void()> attach, std::string detach_name, std::function< void()> detach) |
| | Call named attach/detach functions.
|
| |
| Wiring & | bind (std::string fn_name, std::function< void()> fn) |
| | Call a named custom function once immediately.
|
| |
| const std::string & | bind_attach_name () const |
| | Name of the bind attach function, empty if anonymous or none.
|
| |
| const std::string & | bind_detach_name () const |
| | Name of the bind detach function, empty if anonymous or none.
|
| |
| void | cancel () |
| | Cancel an active wiring and release any owned coroutine.
|
| |
| std::optional< double > | duration () const |
| | Active duration in seconds, if for_duration was called.
|
| |
| uint32_t | entity_id () const |
| | Stable id of the wired entity.
|
| |
| const EFactory & | event_factory () const |
| | Active event-factory, if use(EventFactory) was called.
|
| |
| Wiring & | every (double interval_seconds, Vruta::ProcessingToken token=Vruta::ProcessingToken::SAMPLE_ACCURATE) |
| | Fire the entity on a recurring interval.
|
| |
| const Factory & | factory () const |
| | Active factory variant set by use for non-Event factories.
|
| |
| const std::string & | factory_name () const |
| | Name of the active factory, empty if anonymous or none.
|
| |
| void | finalise () |
| | Apply the configured wiring.
|
| |
| Wiring & | for_duration (double seconds, Vruta::ProcessingToken token=Vruta::ProcessingToken::SAMPLE_ACCURATE) |
| | Limit a recurring registration to a fixed duration then cancel.
|
| |
| bool | has_bind () const |
| | True if any bind overload was called.
|
| |
| bool | has_bind_detach () const |
| | True if bind(attach, detach) was called.
|
| |
| bool | has_position_fn () const |
| | True if position_from was called.
|
| |
| std::optional< double > | interval () const |
| | Recurring interval in seconds, if every was called.
|
| |
| const std::vector< MoveStep > & | move_steps () const |
| | Choreography steps from move_to calls.
|
| |
| Wiring & | move_to (const glm::vec3 &pos, double delay_seconds=0.0) |
| | Choreograph a position move as an EventChain step.
|
| |
| Wiring & | on (std::shared_ptr< Core::Window > window, IO::Keys key) |
| | Fire the entity on a key event from a window.
|
| |
| Wiring & | on (std::shared_ptr< Core::Window > window, IO::Keys key, bool held, std::function< void()> on_release=nullptr) |
| | Fire the entity repeatedly while a key is held, invoking a release callback on release.
|
| |
| Wiring & | on (std::shared_ptr< Core::Window > window, IO::MouseButtons button) |
| | Fire the entity on a mouse button event from a window.
|
| |
| Wiring & | on (std::shared_ptr< Core::Window > window, IO::MouseButtons button, bool held, std::function< void(double, double)> on_release=nullptr) |
| | Fire the entity on mouse-motion events while button is held.
|
| |
| Wiring & | on (std::shared_ptr< Core::Window > window, IO::MouseButtons button, std::function< void(double, double)> on_release) |
| | Fire the entity on mouse button press and invoke a release callback on release.
|
| |
| Wiring & | on (Vruta::NetworkSource &source) |
| | Fire the entity on each incoming message from a network source.
|
| |
| Wiring & | on (Vruta::WindowEventSource &source, Vruta::WindowEventFilter filter={}) |
| | Fire the entity on each matching window event.
|
| |
| Wiring & | operator= (const Wiring &)=delete |
| |
| Wiring & | operator= (Wiring &&)=delete |
| |
| const std::string & | position_fn_name () const |
| | Name of the position function, empty if anonymous.
|
| |
| Wiring & | position_from (PositionFn fn) |
| | Drive position from a callable evaluated on each every() tick.
|
| |
| Wiring & | position_from (std::string fn_name, PositionFn fn) |
| | Drive position from a named callable evaluated on each every() tick.
|
| |
| Wiring & | times (size_t count) |
| | Repeat the configured sequence or choreography N times.
|
| |
| size_t | times_count () const |
| | Repetition count set by times, default 1.
|
| |
| const Trigger & | trigger () const |
| | Active trigger variant set by on.
|
| |
| Wiring & | use (CrossFactory factory) |
| |
| Wiring & | use (EventFactory factory) |
| |
| Wiring & | use (GraphicsFactory factory) |
| |
| Wiring & | use (SoundFactory factory) |
| | Delegate coroutine creation entirely to the caller.
|
| |
| Wiring & | use (std::string fn_name, CrossFactory factory) |
| |
| Wiring & | use (std::string fn_name, EventFactory factory) |
| |
| Wiring & | use (std::string fn_name, GraphicsFactory factory) |
| |
| Wiring & | use (std::string fn_name, SoundFactory factory) |
| | Register a named factory.
|
| |
| | Wiring (const Wiring &)=delete |
| |
| | Wiring (Wiring &&) noexcept=default |
| |
| | ~Wiring ()=default |
| |
Fluent builder that wires an entity into Fabric's scheduling infrastructure.
Obtained via Fabric::wire. Describes when and how the object's function is invoked. Call finalise() to apply the configuration.
No coroutine is created unless a scheduling modifier is set. bind() performs an immediate single call with no coroutine. Any scheduling modifier (every, on, move_to, position_from, use) creates and registers a coroutine owned by Fabric.
Definition at line 41 of file Wiring.hpp.