Package me.wobblyyyy.pathfinder.geometry
Class GigaArc
java.lang.Object
me.wobblyyyy.pathfinder.geometry.GigaArc
public class GigaArc
extends java.lang.Object
The core component behind a circle.
Just to clarify - a GigaArc IS a circle. However, circles have actual circles and hitboxes - using a GigaArc thus allows us to have two "circles" where we'd normally only be able to have one.
- Since:
- 0.1.0
- Author:
- Colin Robertson
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description boolean
isPointInCircle(Point point)
Is a given point contained within the GigaArc?boolean
isPointNearCircle(Point point, double tolerance)
Is a given point close to a circle?boolean
isPointOnCircle(Point point)
Is a given point ON the radius of a circle?boolean
isPointOnCircle(Point point, double tolerance)
Is a given point ON the radius of a circle?Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
center
-
radius
public final double radius -
diameter
public final double diameter -
circumference
public final double circumference -
area
public final double area
-
-
Constructor Details
-
GigaArc
Create a new GigaArc.- Parameters:
center
- the center-point of the GigaArc.radius
- the radius of the arc.
-
-
Method Details
-
isPointInCircle
Is a given point contained within the GigaArc?- Parameters:
point
- the point to test.- Returns:
- whether or not the point is contained in the circle.
-
isPointOnCircle
Is a given point ON the radius of a circle?- Parameters:
point
- the point to test.- Returns:
- whether or not the point is ON the circle.
-
isPointOnCircle
Is a given point ON the radius of a circle?- Parameters:
point
- the point to test.tolerance
- the tolerance of what's defined as being on the edge of the circle.- Returns:
- whether or not the given point is on the edge of the circle.
-
isPointNearCircle
Is a given point close to a circle?- Parameters:
point
- the point to test.tolerance
- the maximum allowable distance a point can be before it's no longer considered to be "close."- Returns:
- whether or not a given point is near the circle.
-