Skip to content
Mandarancio edited this page Jan 15, 2012 · 3 revisions

class QB2Draw

public b2Draw, QObject

public method:

`QB2Draw(QRect displayGeometry,QPainter * p=NULL)`
    Constructor of the drawer, set the display geometry and maybe the painter 

`void DrawPolygon(const b2Vec2 *vertices, int32 vertexCount, const b2Color &color)`
    Draw a polyline (vertices is an array of b2vec2 of vertexCount elements) 
`void DrawSolidPolygon(const b2Vec2 *vertices, int32 vertexCount, const b2Color &color)`
    Draw a polygon (vertices is an array of b2vec2 of vertexCount elements) 

`void DrawCircle(const b2Vec2 &center, float32 radius, const b2Color &color)`
    Draw a circumference 

`void DrawSolidCircle(const b2Vec2 &center, float32 radius, const b2Vec2 &axis, const b2Color &color)`
     Draw a circle

`void DrawSegment(const b2Vec2 &p1, const b2Vec2 &p2, const b2Color &color)`
    Draw a line between p1 and p2

`void DrawTransform(const b2Transform &xf)`
    Set trasformation xf, it contains a translation and a rotation

public slots:

void updateGeometry(QRect displayGeometry)
    Update the geometry

void setPainter(QPainter * p)
    Set the painter
Clone this wiki locally