#include <QPointF>
#include <QList>
#include <Box2D/Box2D.h>
Go to the source code of this file.
|
int | sign (float x) |
| Gets the sign of the floating point value. More...
|
|
float | min (float x, float y) |
| Returns the minimal value of x and y. More...
|
|
float | max (float x, float y) |
| Returns the maximal value of x and y. More...
|
|
float | clamp (float x, float minValue, float maxValue) |
| Clamps x between minValue and maxValue. More...
|
|
void | b2Vec2ToQPointF (b2Vec2 *points, size_t num_points, QPointF *result) |
| Converts an array of b2Vec2 into an array of QPointF. More...
|
|
void | QPointFTob2Vec2 (QList< QPointF > points, b2Vec2 *result) |
| Converts a list of QPointF into an array of b2Vec2. More...
|
|
#define DEGTORAD 0.0174532925199432957f |
#define PI 3.14159265359f |
#define RADTODEG 57.295779513082320876f |
void b2Vec2ToQPointF |
( |
b2Vec2 * |
points, |
|
|
size_t |
num_points, |
|
|
QPointF * |
result |
|
) |
| |
Converts an array of b2Vec2 into an array of QPointF.
- Parameters
-
points | Array of b2Vec2 to convert. |
num_points | Number of points in the array. |
result | Array to store the result in. |
- Note
- Assumes that result is an array equal or larger than the points array.
Referenced by genericPaintFixture().
float clamp |
( |
float |
x, |
|
|
float |
minValue, |
|
|
float |
maxValue |
|
) |
| |
|
inline |
Clamps x between minValue and maxValue.
- Parameters
-
x | Value to be clamped. |
minValue | Minimum value x can have. |
maxValue | Maximum value x can have. |
- Returns
- minValue if x < minValue. x if minValue < x < maxValue. maxValue if x > maxvalue.
References max(), and min().
Referenced by ChirpIrSensor::value().
float max |
( |
float |
x, |
|
|
float |
y |
|
) |
| |
|
inline |
float min |
( |
float |
x, |
|
|
float |
y |
|
) |
| |
|
inline |
Returns the minimal value of x and y.
- Parameters
-
x | First value. |
y | Second value. |
- Returns
- If x <= y returns x. If y < x returns y.
Referenced by clamp(), and Chirp::computeBoundingRect().
void QPointFTob2Vec2 |
( |
QList< QPointF > |
points, |
|
|
b2Vec2 * |
result |
|
) |
| |
Converts a list of QPointF into an array of b2Vec2.
- Parameters
-
points | Source list to convert. |
result | Array to store the result in. |
- Note
- Assumes that result is an array equal or larger than the points array.
Referenced by PushableObject::PushableObject(), and Wall::Wall().