| Constructor and Description |
|---|
EnclosingBall(P center,
double radius,
Collection<P> support)
Construct an enclosing ball defined by a collection of support points.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
contains(P point)
Check if a point is within the ball or on the boundary.
|
boolean |
contains(P point,
DoublePrecisionContext precision)
Check if a point is within the ball or on the boundary, using the given precision
context for floating point comparison.
|
P |
getCenter()
Get the center of the ball.
|
double |
getRadius()
Get the radius of the ball.
|
List<P> |
getSupport()
Get the support points used to define the ball.
|
int |
getSupportSize()
Get the number of support points used to define the ball.
|
String |
toString() |
public EnclosingBall(P center, double radius, Collection<P> support)
center - center of the ballradius - radius of the ballsupport - support points used to define the ballpublic P getCenter()
public double getRadius()
public List<P> getSupport()
public int getSupportSize()
public boolean contains(P point)
point - point to testpublic boolean contains(P point, DoublePrecisionContext precision)
point - point to testprecision - precision context to use for floating point comparisonsCopyright © 2016–2020 The Apache Software Foundation. All rights reserved.