- Object
-
- CircleDetector
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
contains(Circle circle1, Transform transform1, Circle circle2, Transform transform2, Containment containment)
Fast method for determining whether one circle is contained in anotherCircle
s.static boolean
detect(Circle circle1, Transform transform1, Circle circle2, Transform transform2)
Fast method for determining a collision between twoCircle
s.static boolean
detect(Circle circle1, Transform transform1, Circle circle2, Transform transform2, Penetration penetration)
Fast method for determining a collision between twoCircle
s.static boolean
distance(Circle circle1, Transform transform1, Circle circle2, Transform transform2, Separation separation)
Fast method for determining the distance between twoCircle
s.static boolean
raycast(Ray ray, double maxLength, Circle circle, Transform transform, Raycast raycast)
Performs a ray cast against the given circle.
-
-
-
Method Detail
-
detect
public static final boolean detect(Circle circle1, Transform transform1, Circle circle2, Transform transform2, Penetration penetration)
Fast method for determining a collision between twoCircle
s.Returns true if the given
Circle
s are intersecting and places the penetration vector and depth in the givenPenetration
object.If the
Circle
centers are coincident then the penetrationVector2
will be the zeroVector2
, however, the penetration depth will be correct. In this case its up to the caller to determine a reasonable penetrationVector2
.NOTE: It's the responsibility of the caller to clear the given
Penetration
object before calling this method.
-
detect
public static final boolean detect(Circle circle1, Transform transform1, Circle circle2, Transform transform2)
-
distance
public static final boolean distance(Circle circle1, Transform transform1, Circle circle2, Transform transform2, Separation separation)
Fast method for determining the distance between twoCircle
s.Returns true if the given
Circle
s are separated and places the separating vector and distance in the givenSeparation
object.NOTE: It's the responsibility of the caller to clear the given
Separation
object before calling this method.
-
contains
public static final boolean contains(Circle circle1, Transform transform1, Circle circle2, Transform transform2, Containment containment)
Fast method for determining whether one circle is contained in anotherCircle
s.Returns true if one of the
Circle
s is contained in the other and places the result in the givenContainment
object.NOTE: It's the responsibility of the caller to clear the given
Containment
object before calling this method.
-
-