8 QRectF addBBox(QRectF r1, QRectF r2);
9 bool inBox(const QPointF &p, const QRectF &box);
11 QPointF normalize (const QPointF &p);
14 qreal dotProduct (const QPointF &a, const QPointF &b);
16 class PolygonCollisionResult {
18 // Are the polygons going to intersect forward in time?
21 // Are the polygons currently intersecting?
24 // The translation to apply to the first polygon to push the polygons apart.
25 QPointF minTranslation;
29 void ProjectPolygon(QPointF axis, QPolygonF polygon, qreal &min, qreal &max) ;
30 qreal intervalDistance(qreal minA, qreal maxA, qreal minB, qreal maxB);
31 PolygonCollisionResult PolygonCollision(QPolygonF polygonA,
32 QPolygonF polygonB, QPointF velocity);