30 void Apply(std::vector<QPointF> &control_points,
31 std::vector<QPointF> &velocity,
46 std::vector<QPointF> &velocity,
48 const std::vector<QPointF> &control_points,
49 double blob_radius)
override;
73 std::vector<QPointF> &velocity,
74 const QPointF &blob_center,
Abstract base class defining the interface for different blob animation states.
Definition blob_state.h:16
void ApplyForce(const QVector2D &force, std::vector< QPointF > &velocity, QPointF &blob_center, const std::vector< QPointF > &control_points, double blob_radius) override
Applies an external force to the blob with dampening specific to the Idle state. The force is scaled ...
Definition idle_state.cpp:93
double second_phase_
Phase offset for the secondary wave effect.
Definition idle_state.h:81
IdleState()
Constructs an IdleState object. Initializes phase offsets.
Definition idle_state.cpp:5
void UpdatePhases()
Updates the internal phase variables used for the wave and rotation animations. Increments wave_phase...
Definition idle_state.cpp:8
double heartbeat_phase_
Current phase of the heartbeat animation cycle (0 to 2*PI).
Definition idle_state.h:89
void ResetInitialization()
Resets the initialization state, causing the heartbeat effect to play again. Sets is_initializing_ to...
Definition idle_state.cpp:25
static constexpr int kRequiredHeartbeats
The number of heartbeat cycles to perform during initialization.
Definition idle_state.h:91
void ApplyHeartbeatEffect(const std::vector< QPointF > &control_points, std::vector< QPointF > &velocity, const QPointF &blob_center, const BlobConfig::BlobParameters ¶ms)
Applies a pulsating "heartbeat" effect to the blob. Used during the initial phase after entering the ...
Definition idle_state.cpp:114
bool is_initializing_
Flag indicating if the state is currently running the initial heartbeat animation.
Definition idle_state.h:85
BlobConfig::IdleParameters idle_params_
Parameters specific to the idle animation (wave amplitude, frequency, phase).
Definition idle_state.h:79
double rotation_phase_
Phase offset for the rotational effect.
Definition idle_state.h:83
void Apply(std::vector< QPointF > &control_points, std::vector< QPointF > &velocity, QPointF &blob_center, const BlobConfig::BlobParameters ¶ms) override
Applies the idle animation effects (waves, rotation, centering) or the initial heartbeat effect....
Definition idle_state.cpp:31
int heartbeat_count_
Counter for the number of heartbeats completed during initialization.
Definition idle_state.h:87
Structure holding parameters related to the blob's visual appearance and basic geometry.
Definition blob_config.h:25
Structure holding parameters specific to the Idle state animation.
Definition blob_config.h:73