ChirpSim
 All Classes Namespaces Files Functions Variables Typedefs Friends Macros
Functions
drawutilities.cpp File Reference
#include "drawutilities.h"
#include <QPainter>
#include <QStyleOptionGraphicsItem>
#include <QWidget>
#include <QBrush>
#include <QPen>
#include <Box2D/Box2D.h>
#include "mathutility.h"
Include dependency graph for drawutilities.cpp:

Functions

void genericPaint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget, b2Body *body)
 genericPaint draws all fixtures on a body, handling the simple cases where all you want to draw is the physical boundaries. More...
 
void genericPaintFixture (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget, b2Fixture *fixture)
 genericPaintFixture draws a single fixture. More...
 

Function Documentation

void genericPaint ( QPainter *  painter,
const QStyleOptionGraphicsItem *  option,
QWidget *  widget,
b2Body *  body 
)

genericPaint draws all fixtures on a body, handling the simple cases where all you want to draw is the physical boundaries.

Parameters
bodyis the body containing the fixtures to draw.

References genericPaintFixture().

Referenced by Arena::paint(), Wall::paint(), and PushableObject::paint().

Here is the call graph for this function:

Here is the caller graph for this function:

void genericPaintFixture ( QPainter *  painter,
const QStyleOptionGraphicsItem *  option,
QWidget *  widget,
b2Fixture *  fixture 
)

genericPaintFixture draws a single fixture.

Parameters
fixtureis the fixture to draw the boundaries of.

References b2Vec2ToQPointF().

Referenced by genericPaint().

Here is the call graph for this function:

Here is the caller graph for this function: