Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
pulp::view::Tween Class Reference

#include <animation.hpp>

Public Member Functions

 Tween ()=default
 Tween (float from, float to, float duration_seconds, EasingFunction ease=easing::linear)
float advance (float dt)
float current () const
bool finished () const
void reset ()
void set_motion_provenance (std::string source_kind, std::string source_id, std::string source_file={}, int source_line=0)
void set_motion_provenance (motion::Provenance p)
 Set the full envelope.
const motion::Provenance & motion_provenance () const noexcept
void publish (std::string view_name, std::string metric_name, motion::PublishOptions opts={}) const
 Publish the tween's current value through the motion publish channel under the given (view, metric) name.

Constructor & Destructor Documentation

◆ Tween() [1/2]

pulp::view::Tween::Tween ( )
default

◆ Tween() [2/2]

pulp::view::Tween::Tween ( float from,
float to,
float duration_seconds,
EasingFunction ease = easing::linear )
inline

Member Function Documentation

◆ advance()

float pulp::view::Tween::advance ( float dt)
inline

◆ current()

float pulp::view::Tween::current ( ) const
inline

◆ finished()

bool pulp::view::Tween::finished ( ) const
inline

◆ motion_provenance()

const motion::Provenance & pulp::view::Tween::motion_provenance ( ) const
inlinenoexcept

◆ publish()

void pulp::view::Tween::publish ( std::string view_name,
std::string metric_name,
motion::PublishOptions opts = {} ) const
inline

Publish the tween's current value through the motion publish channel under the given (view, metric) name.

Stamps the tween's provenance envelope (set via set_motion_provenance or PULP_MOTION_TWEEN) onto the emitted event. Cheap no-op when motion tracing is off (Coordinator::tracing_enabled() == false).

◆ reset()

void pulp::view::Tween::reset ( )
inline

◆ set_motion_provenance() [1/2]

void pulp::view::Tween::set_motion_provenance ( motion::Provenance p)
inline

Set the full envelope.

Useful when the provenance is built up somewhere else (e.g. a design-import codegen step).

◆ set_motion_provenance() [2/2]

void pulp::view::Tween::set_motion_provenance ( std::string source_kind,
std::string source_id,
std::string source_file = {},
int source_line = 0 )
inline

The documentation for this class was generated from the following file:
  • /home/runner/work/pulp/pulp/core/view/include/pulp/view/animation.hpp