Wavelength
Privacy-focused, cross-platform, and open-source communication application
Loading...
Searching...
No Matches
resizing_state.h
Go to the documentation of this file.
1#ifndef RESIZINGSTATE_H
2#define RESIZINGSTATE_H
3
4#include "blob_state.h"
5
15class ResizingState final : public BlobState {
16public:
21
30 void Apply(std::vector<QPointF> &control_points,
31 std::vector<QPointF> &velocity,
32 QPointF &blob_center,
33 const BlobConfig::BlobParameters &params) override;
34
46 void ApplyForce(const QVector2D &force,
47 std::vector<QPointF> &velocity,
48 QPointF &blob_center,
49 const std::vector<QPointF> &control_points,
50 double blob_radius) override;
51
64 void HandleResize(std::vector<QPointF> &control_points,
65 std::vector<QPointF> &target_points,
66 std::vector<QPointF> &velocity,
67 QPointF &blob_center,
68 const QSize &old_size,
69 const QSize &new_size);
70};
71
72#endif // RESIZINGSTATE_H
Abstract base class defining the interface for different blob animation states.
Definition blob_state.h:16
void Apply(std::vector< QPointF > &control_points, std::vector< QPointF > &velocity, QPointF &blob_center, const BlobConfig::BlobParameters &params) override
Applies state-specific logic. Currently empty for ResizingState. The primary logic for this state is ...
Definition resizing_state.cpp:8
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, similar to the Moving state. The force applied to each control...
Definition resizing_state.cpp:41
void HandleResize(std::vector< QPointF > &control_points, std::vector< QPointF > &target_points, std::vector< QPointF > &velocity, QPointF &blob_center, const QSize &old_size, const QSize &new_size)
Handles the logic when a resize event occurs while in this state. Recalculates the blob's center base...
Definition resizing_state.cpp:14
ResizingState()
Default constructor for ResizingState.
Definition resizing_state.cpp:5
Structure holding parameters related to the blob's visual appearance and basic geometry.
Definition blob_config.h:25