tidy&format(all): all files formatted and relevant warnings resolved
C++ / build (pull_request) Failing after 15s
Lint & Format (JS/TS) / lint-format (pull_request) Successful in 28s
Python / lint-format (pull_request) Successful in 45s
Python / test (pull_request) Successful in 38s
Lint & Format (Rust) / lint-format (pull_request) Successful in 1m45s
C++ / build (pull_request) Failing after 15s
Lint & Format (JS/TS) / lint-format (pull_request) Successful in 28s
Python / lint-format (pull_request) Successful in 45s
Python / test (pull_request) Successful in 38s
Lint & Format (Rust) / lint-format (pull_request) Successful in 1m45s
This commit is contained in:
@@ -9,85 +9,78 @@
|
||||
class BlobGroup;
|
||||
|
||||
class BlobShape : public QQuickItem {
|
||||
Q_OBJECT
|
||||
Q_PROPERTY(BlobGroup* group READ group WRITE setGroup NOTIFY groupChanged)
|
||||
Q_PROPERTY(qreal radius READ radius WRITE setRadius NOTIFY radiusChanged)
|
||||
Q_PROPERTY(QMatrix4x4 deformMatrix READ deformMatrix NOTIFY deformMatrixChanged)
|
||||
Q_PROPERTY(QMatrix4x4 rawDeformMatrix READ rawDeformMatrix NOTIFY rawDeformMatrixChanged)
|
||||
Q_OBJECT
|
||||
Q_PROPERTY(BlobGroup* group READ group WRITE setGroup NOTIFY groupChanged)
|
||||
Q_PROPERTY(qreal radius READ radius WRITE setRadius NOTIFY radiusChanged)
|
||||
Q_PROPERTY(
|
||||
QMatrix4x4 deformMatrix READ deformMatrix NOTIFY deformMatrixChanged)
|
||||
Q_PROPERTY(
|
||||
QMatrix4x4 rawDeformMatrix READ rawDeformMatrix NOTIFY
|
||||
rawDeformMatrixChanged)
|
||||
|
||||
friend class BlobGroup;
|
||||
friend class BlobGroup;
|
||||
|
||||
public:
|
||||
explicit BlobShape(QQuickItem* parent = nullptr);
|
||||
~BlobShape() override = default;
|
||||
public:
|
||||
explicit BlobShape(QQuickItem* parent = nullptr);
|
||||
~BlobShape() override = default;
|
||||
|
||||
[[nodiscard]] BlobGroup* group() const {
|
||||
return m_group;
|
||||
}
|
||||
[[nodiscard]] BlobGroup* group() const { return m_group; }
|
||||
|
||||
void setGroup(BlobGroup* g);
|
||||
void setGroup(BlobGroup* g);
|
||||
|
||||
[[nodiscard]] qreal radius() const {
|
||||
return m_radius;
|
||||
}
|
||||
[[nodiscard]] qreal radius() const { return m_radius; }
|
||||
|
||||
void setRadius(qreal r);
|
||||
void setRadius(qreal r);
|
||||
|
||||
[[nodiscard]] QMatrix4x4 deformMatrix() const {
|
||||
return m_centeredDeformMatrix;
|
||||
}
|
||||
[[nodiscard]] QMatrix4x4 deformMatrix() const {
|
||||
return m_centeredDeformMatrix;
|
||||
}
|
||||
|
||||
[[nodiscard]] QMatrix4x4 rawDeformMatrix() const {
|
||||
return m_deformMatrix;
|
||||
}
|
||||
[[nodiscard]] QMatrix4x4 rawDeformMatrix() const { return m_deformMatrix; }
|
||||
|
||||
signals:
|
||||
void groupChanged();
|
||||
void radiusChanged();
|
||||
void deformMatrixChanged();
|
||||
void rawDeformMatrixChanged();
|
||||
signals:
|
||||
void groupChanged();
|
||||
void radiusChanged();
|
||||
void deformMatrixChanged();
|
||||
void rawDeformMatrixChanged();
|
||||
|
||||
protected:
|
||||
void componentComplete() override;
|
||||
void geometryChange(const QRectF& newGeometry, const QRectF& oldGeometry) override;
|
||||
void updatePolish() override;
|
||||
QSGNode* updatePaintNode(QSGNode* oldNode, UpdatePaintNodeData*) override;
|
||||
protected:
|
||||
void componentComplete() override;
|
||||
void geometryChange(
|
||||
const QRectF& newGeometry, const QRectF& oldGeometry) override;
|
||||
void updatePolish() override;
|
||||
QSGNode* updatePaintNode(QSGNode* oldNode, UpdatePaintNodeData*) override;
|
||||
|
||||
[[nodiscard]] virtual bool isInvertedRect() const {
|
||||
return false;
|
||||
}
|
||||
[[nodiscard]] virtual bool isInvertedRect() const { return false; }
|
||||
|
||||
virtual bool isExcluded(const BlobShape* /*other*/) const {
|
||||
return false;
|
||||
}
|
||||
virtual bool isExcluded(const BlobShape*) const { return false; }
|
||||
|
||||
virtual void cornerRadii(float out[4]) const;
|
||||
virtual void cornerRadii(float out[4]) const;
|
||||
|
||||
virtual void updatePhysics() {
|
||||
}
|
||||
virtual void updatePhysics() {}
|
||||
|
||||
virtual void registerWithGroup();
|
||||
virtual void unregisterFromGroup();
|
||||
void updateCenteredDeformMatrix();
|
||||
virtual void registerWithGroup();
|
||||
virtual void unregisterFromGroup();
|
||||
void updateCenteredDeformMatrix();
|
||||
|
||||
BlobGroup* m_group = nullptr;
|
||||
qreal m_radius = 0;
|
||||
QMatrix4x4 m_deformMatrix;
|
||||
QMatrix4x4 m_centeredDeformMatrix;
|
||||
BlobGroup* m_group = nullptr;
|
||||
qreal m_radius = 0;
|
||||
QMatrix4x4 m_deformMatrix;
|
||||
QMatrix4x4 m_centeredDeformMatrix;
|
||||
|
||||
float m_cachedPaddedX = 0;
|
||||
float m_cachedPaddedY = 0;
|
||||
float m_cachedPaddedW = 0;
|
||||
float m_cachedPaddedH = 0;
|
||||
QRectF m_localPaddedRect;
|
||||
QVector<BlobRectData> m_cachedRects;
|
||||
int m_cachedMyIndex = -2;
|
||||
float m_pendingDx = 0;
|
||||
float m_pendingDy = 0;
|
||||
float m_pendingDw = 0;
|
||||
float m_pendingDh = 0;
|
||||
bool m_cachedHasInverted = false;
|
||||
float m_cachedInvertedRadius = 0;
|
||||
float m_cachedInvertedOuter[4] = {};
|
||||
float m_cachedInvertedInner[4] = {};
|
||||
float m_cachedPaddedX = 0;
|
||||
float m_cachedPaddedY = 0;
|
||||
float m_cachedPaddedW = 0;
|
||||
float m_cachedPaddedH = 0;
|
||||
QRectF m_localPaddedRect;
|
||||
QVector<BlobRectData> m_cachedRects;
|
||||
int m_cachedMyIndex = -2;
|
||||
float m_pendingDx = 0;
|
||||
float m_pendingDy = 0;
|
||||
float m_pendingDw = 0;
|
||||
float m_pendingDh = 0;
|
||||
bool m_cachedHasInverted = false;
|
||||
float m_cachedInvertedRadius = 0;
|
||||
float m_cachedInvertedOuter[4] = {};
|
||||
float m_cachedInvertedInner[4] = {};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user