Wavelength
Privacy-focused, cross-platform, and open-source communication application
Loading...
Searching...
No Matches
blob_state.h
Go to the documentation of this file.
1#ifndef BLOBSTATE_H
2#define BLOBSTATE_H
3
4// ReSharper disable once CppUnusedIncludeDirective
5#include <QVector2D>
6#include <vector>
7#include "../blob_config.h"
8
16class BlobState {
17public:
21 virtual ~BlobState() = default;
22
32 virtual void Apply(std::vector<QPointF> &control_points,
33 std::vector<QPointF> &velocity,
34 QPointF &blob_center,
35 const BlobConfig::BlobParameters &params) = 0;
36
46 virtual 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) = 0;
51};
52
53#endif // BLOBSTATE_H
Abstract base class defining the interface for different blob animation states.
Definition blob_state.h:16
virtual void Apply(std::vector< QPointF > &control_points, std::vector< QPointF > &velocity, QPointF &blob_center, const BlobConfig::BlobParameters &params)=0
Applies the state-specific logic and effects to the blob. This method is called periodically by the a...
virtual ~BlobState()=default
Virtual destructor. Ensures proper cleanup when deleting derived state objects through a base class p...
virtual void ApplyForce(const QVector2D &force, std::vector< QPointF > &velocity, QPointF &blob_center, const std::vector< QPointF > &control_points, double blob_radius)=0
Applies an external force to the blob, potentially modified by the current state. Allows states to re...
Structure holding parameters related to the blob's visual appearance and basic geometry.
Definition blob_config.h:25