public final class Circle extends AbstractEllipse
WARNING: this API is experimental and will likely change in the near future.
centerX, centerY
Constructor and Description |
---|
Circle() |
Circle(double centerX,
double centerY,
double radius) |
Circle(Point center,
double radius) |
Modifier and Type | Method and Description |
---|---|
void |
addArguments(StringBuilder buffer) |
Circle |
clone() |
boolean |
contains(double x,
double y)
Return true if this shape contains the point defined by (
x , y ). |
double |
distance(double x,
double y)
Calculate the distance between (x, y) and this circle's center.
|
boolean |
equals(Object other) |
boolean |
fastIntersects(Rectangle other)
Check if this shape's bounding box intersects with
box . |
Rectangle |
getBoundingBox()
Get the rectangle that represents the bounding box that fully contains this shape.
|
double |
getMaxRadius()
Get the minimum radius for this ellipse.
|
double |
getMinRadius()
Get the maximum radius for this ellipse.
|
Point |
getPoint(double angle)
Get a point on this ellipse at
angle . |
double |
getPointX(double angle)
Get the X coordinate for a point on this ellipse at
angle . |
double |
getPointY(double angle)
Get the Y coordinate for a point on this ellipse at
angle . |
double |
getRadius()
Get the radius for this circle.
|
protected double |
getRadiusA()
Get the first radius for the ellipse.
|
protected double |
getRadiusB()
Get the second for the ellipse.
|
protected double |
getRotationCos()
Get the cosine of the rotation angle.
|
protected double |
getRotationSin()
Get the sine of the rotation angle.
|
String |
getTypeName() |
int |
hashCode() |
boolean |
intersects(Circle other)
Check if
other |
boolean |
intersects(Rectangle other)
Check if
other |
boolean |
intersects(Rectangle box,
AbstractEllipse ellipse)
Check for intersection with
other . |
boolean |
intersects(Rectangle box,
Shape shape)
Check if this shape intersects with
other . |
Circle |
readExternal(DataInput in) |
void |
setRadius(double value) |
void |
writeExternal(DataOutput out) |
getA, getB, getC, getCenter, getCenterX, getCenterY, getHeight, getRotationAngle, getWidth, intersects, setCenter, setCenterX, setCenterY
compareTo, contains, intersects, readExternal, toString, toString, toString, valueOf, writeExternal
public Circle()
public Circle(double centerX, double centerY, double radius)
public Circle(Point center, double radius)
public String getTypeName()
getTypeName
in class Shape
public double getRadius()
public void setRadius(double value)
protected double getRadiusA()
This is the radius along the X plane.
getRadiusA
in class AbstractEllipse
protected double getRadiusB()
This is the radius along the Y plane.
getRadiusB
in class AbstractEllipse
public double getMaxRadius()
getMaxRadius
in class AbstractEllipse
public double getMinRadius()
getMinRadius
in class AbstractEllipse
public Point getPoint(double angle)
angle
.getPoint
in class AbstractEllipse
public double getPointX(double angle)
angle
.getPointX
in class AbstractEllipse
public double getPointY(double angle)
angle
.getPointY
in class AbstractEllipse
protected double getRotationCos()
getRotationCos
in class AbstractEllipse
protected double getRotationSin()
getRotationSin
in class AbstractEllipse
public boolean contains(double x, double y)
x
, y
).public boolean intersects(Rectangle box, Shape shape)
other
.intersects
in class AbstractEllipse
box
- The bounding box of this shape from Shape.getBoundingBox()
.shape
- The shape to check for intersection withpublic double distance(double x, double y)
public boolean intersects(Rectangle box, AbstractEllipse ellipse)
other
.intersects
in class AbstractEllipse
public boolean fastIntersects(Rectangle other)
box
.fastIntersects
in class Shape
public Rectangle getBoundingBox()
getBoundingBox
in class Shape
public void addArguments(StringBuilder buffer)
addArguments
in class Shape
public void writeExternal(DataOutput out) throws IOException
writeExternal
in class Shape
IOException
public Circle readExternal(DataInput in) throws IOException
readExternal
in class Shape
IOException
Copyright © 2018 Attivio, Inc. All Rights Reserved.
PATENT NOTICE: Attivio, Inc. Software Related Patents. With respect to the Attivio software product(s) being used, the following patents apply: Querying Joined Data Within A Search Engine Index: United States Patent No.(s): 8,073,840. Ordered Processing of Groups of Messages: U.S. Patent No.(s) 8,495,656. Signal processing approach to sentiment analysis for entities in documents: U.S. Patent No.(s) 8,725,494. Other U.S. and International Patents Pending.