A QObject container for a Box2D b2Body.
Definition: Body.h:57
const QList< QPointF > & getVertices() const
Returns vertices as a QList.
QVariantList vertices
The vertices defining the PolygonBody.
Definition: PolygonBody.h:34
void setVerticesFromVariantList(const QVariantList &value)
Sets vertices.
A QObject container for a Box2D b2Body that represents a polygon.
Definition: PolygonBody.h:27
void verticesChanged()
Emitted when vertices changes.
QVariantList getVerticesAsVariantList() const
Returns vertices as a QVariantList.
PolygonBody(QObject *parent=nullptr)
Constructs a PolygonBody.
virtual void forEachShape(const std::function< void(b2Shape *)> &func) override
Calls func on the b2Shapes that represents this PolygonBody.
const QList< QPolygonF > & getTriangles()
Returns a QList of this PolygonBody's triangles.
void setVertices(const QList< QPointF > &value)
Sets vertices.