20 #include <Box2D/Box2D.h>
36 static inline float dotProduct(
const b2Vec2& v1,
const b2Vec2& v2) {
37 return v1.x * v2.x + v1.y * v2.y;
53 return b2Vec2(vec.
x(), vec.
y());
static QPointF toQPointF(const b2Vec2 &vec)
Returns a b2Vec2 converted to a QPointF.
Definition: Box2dUtil.h:44
static QColor toQColor(const b2ParticleColor &color)
Returns a b2ParticleColor converted to a QColor.
Definition: Box2dUtil.h:76
static b2ParticleColor toB2ParticleColor(const QColor &color)
Returns a QColor converted to a b2ParticleColor.
Definition: Box2dUtil.h:84
QColor fromRgbF(qreal r, qreal g, qreal b, qreal a)
static b2AABB toB2AABB(const QRectF &rect)
Returns a QRectF converted to a b2AABB.
Definition: Box2dUtil.h:68
QPointF bottomRight() const
static float dotProduct(const b2Vec2 &v1, const b2Vec2 &v2)
Returns the computed inner product between two Box2D vectors.
Definition: Box2dUtil.h:36
static b2Vec2 toB2Vec2(const QPointF &vec)
Returns a QPointF converted to a b2Vec2.
Definition: Box2dUtil.h:52
static QRectF toQRectF(const b2AABB &aabb)
Returns a b2AABB converted to a QRectF.
Definition: Box2dUtil.h:60