Package frc.lib.math
Class SeparatingAxis
java.lang.Object
frc.lib.math.SeparatingAxis
Implementation of Separating Axis Theorem solver.
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleansolve(ConvexShape shape1, ConvexShape shape2, Penetration penetration) Solve the for the separating axis between two convex shape.
-
Method Details
-
solve
Solve the for the separating axis between two convex shape.- Parameters:
shape1- resolving object. Result contains the transform for this shape to no longer be penetrating.shape2- pseudo-static object. Result assumes this shape does not move.penetration- out-parameter. Contains the direction and length of the minimum translation vector.- Returns:
trueifshape1andshape2are intersecting. Iffalse,penetrationis unmodified.
-