1 #ifndef _RIVE_VERTEX_HPP_
2 #define _RIVE_VERTEX_HPP_
3 #include "rive/bones/weight.hpp"
4 #include "rive/generated/shapes/vertex_base.hpp"
5 #include "rive/math/mat2d.hpp"
7 class Vertex : public VertexBase {
11 Weight* m_Weight = nullptr;
12 void weight(Weight* value) { m_Weight = value; }
15 template <typename T> T* weight() { return m_Weight->as<T>(); }
16 virtual void deform(const Mat2D& worldTransform, const float* boneTransforms);
17 bool hasWeight() { return m_Weight != nullptr; }
18 Vec2D renderTranslation();
21 virtual void markGeometryDirty() = 0;
22 void xChanged() override;
23 void yChanged() override;
27 Weight* weight() { return m_Weight; }