public class Circumcircle extends Object
Constructor and Description |
---|
Circumcircle() |
Modifier and Type | Method and Description |
---|---|
void |
compute(double x0,
double y0,
double x1,
double y1,
double x2,
double y2)
Computes the circumcircle for the specified vertices and stores
results in elements of this instance.
|
boolean |
compute(Vertex a,
Vertex b,
Vertex c)
Computes the circumcircle for the specified vertices and stores
results in elements of this instance.
|
static Circumcircle |
computeCircumcircle(Vertex a,
Vertex b,
Vertex c)
Computes the circumcircle for the specified vertices.
|
void |
copy(Circumcircle c)
Copies the content of the specified circumcircle instance.
|
Rectangle2D |
getBounds()
Gets the bounds of the circumcircle.
|
double |
getRadius()
Gets the radius of the circumcircle
|
double |
getRadiusSq()
Gets the square of the radius of the circumcircle.
|
double |
getX()
Gets the x coordinate of the center of the circumcircle.
|
double |
getY()
Gets the y coordinate of the center of the circumcircle.
|
void |
setCircumcenter(double x,
double y,
double r2)
Sets the coordinate for the circumcenter and radius for this
instance.
|
String |
toString() |
public double getRadiusSq()
public double getRadius()
public double getX()
public double getY()
public void copy(Circumcircle c)
c
- a valid circumcircle instance.public static Circumcircle computeCircumcircle(Vertex a, Vertex b, Vertex c)
a
- the initial vertex.b
- the second vertex.c
- the third vertex.public boolean compute(Vertex a, Vertex b, Vertex c)
a
- the initial vertex.b
- the second vertex.c
- the third vertex.public void compute(double x0, double y0, double x1, double y1, double x2, double y2)
x0
- the x coordinate of the first vertexy0
- the y coordinate of the first vertexx1
- the x coordinate of the second vertexy1
- the y coordinate of the second vertexx2
- the x coordinate of the third vertexy2
- the y coordinate of the third vertexpublic void setCircumcenter(double x, double y, double r2)
x
- the x coordinate for the circumcentery
- the y coordinate for the circumcenterr2
- the square of the radius for the circumcirclepublic Rectangle2D getBounds()
Copyright © 2021. All rights reserved.