VoltAir
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Groups Pages
Functions
Box2dUtil Namespace Reference

Namespace containing frequently used static helper functions related to Box2D. More...

Functions

static float dotProduct (const b2Vec2 &v1, const b2Vec2 &v2)
 Returns the computed inner product between two Box2D vectors. More...
 
static QPointF toQPointF (const b2Vec2 &vec)
 Returns a b2Vec2 converted to a QPointF. More...
 
static b2Vec2 toB2Vec2 (const QPointF &vec)
 Returns a QPointF converted to a b2Vec2. More...
 
static QRectF toQRectF (const b2AABB &aabb)
 Returns a b2AABB converted to a QRectF. More...
 
static b2AABB toB2AABB (const QRectF &rect)
 Returns a QRectF converted to a b2AABB. More...
 
static QColor toQColor (const b2ParticleColor &color)
 Returns a b2ParticleColor converted to a QColor. More...
 
static b2ParticleColor toB2ParticleColor (const QColor &color)
 Returns a QColor converted to a b2ParticleColor. More...
 

Detailed Description

Namespace containing frequently used static helper functions related to Box2D.

Function Documentation

static float Box2dUtil::dotProduct ( const b2Vec2 &  v1,
const b2Vec2 &  v2 
)
inlinestatic

Returns the computed inner product between two Box2D vectors.

Parameters
v1First vector for the inner product calculation
v2Second vector for the inner product calculation
static b2AABB Box2dUtil::toB2AABB ( const QRectF rect)
inlinestatic

Returns a QRectF converted to a b2AABB.

Parameters
rectQRectF to convert
static b2ParticleColor Box2dUtil::toB2ParticleColor ( const QColor color)
inlinestatic

Returns a QColor converted to a b2ParticleColor.

Parameters
colorQColor to convert
static b2Vec2 Box2dUtil::toB2Vec2 ( const QPointF vec)
inlinestatic

Returns a QPointF converted to a b2Vec2.

Parameters
vecQPointF to convert
static QColor Box2dUtil::toQColor ( const b2ParticleColor &  color)
inlinestatic

Returns a b2ParticleColor converted to a QColor.

Parameters
colorb2ParticleColor to convert
static QPointF Box2dUtil::toQPointF ( const b2Vec2 &  vec)
inlinestatic

Returns a b2Vec2 converted to a QPointF.

Parameters
vecb2Vec2 to convert
static QRectF Box2dUtil::toQRectF ( const b2AABB &  aabb)
inlinestatic

Returns a b2AABB converted to a QRectF.

Parameters
aabbb2AABB to convert