summaryrefslogtreecommitdiff
path: root/2d/_collisions/polygon_polygon
diff options
context:
space:
mode:
Diffstat (limited to '2d/_collisions/polygon_polygon')
-rw-r--r--2d/_collisions/polygon_polygon/snippet2.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/2d/_collisions/polygon_polygon/snippet2.cpp b/2d/_collisions/polygon_polygon/snippet2.cpp
index 8cbdcbe..a279f65 100644
--- a/2d/_collisions/polygon_polygon/snippet2.cpp
+++ b/2d/_collisions/polygon_polygon/snippet2.cpp
@@ -7,9 +7,9 @@ struct IntersectionResult {
};
struct Edge {
- Vector2 normal;
- Vector2 start;
- Vector2 end;
+ Vector2 normal;
+ Vector2 start;
+ Vector2 end;
};
struct SATResult {
@@ -107,11 +107,11 @@ IntersectionResult getIntersection(ConvexPolygon* first, ConvexPolygon* second)
return ir;
}
- ir.intersect = true;
- ir.relativeVelocity = first->body.velocity - second->body.velocity;
- ir.collisionNormal = sat.minOverlapEdge->normal;
+ ir.intersect = true;
+ ir.relativeVelocity = first->body.velocity - second->body.velocity;
+ ir.collisionNormal = sat.minOverlapEdge->normal;
ir.firstPointOfApplication = sat.overlapPoint - first->body.position;
ir.secondPointOfApplication = sat.overlapPoint - second->body.position;;
- return ir;
+ return ir;
}