Package buildengine.math.collision
Class SAT
java.lang.Object
buildengine.math.collision.SAT
Separating Axis Theorem
This is a static-only class and contains calculations
regarding collisions. The collisions are calculated
using an implementation off Separating Axis Theorem.
This class uses the custom Shape library.
- Author:
- Kai v. Maurik
-
Nested Class Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Contact
collidePolygons
(Polygon a, Polygon b) Check if two polygons are collidingstatic Contact
containsPoint
(Polygon a, Vector2f v) Check if a polygon contains a specified point
-
Constructor Details
-
SAT
public SAT()
-
-
Method Details
-
collidePolygons
Check if two polygons are colliding- Parameters:
a
- The first polygonb
- The second polygon- Returns:
- A contact object if there is collision containing the collision
information. Otherwise returns
null
.
-
containsPoint
Check if a polygon contains a specified point- Parameters:
a
- The polygonv
- The point- Returns:
- A contact object if there is collision containing the collision
information. Otherwise returns
null
.
-