public abstract class AbstractPolygon extends Shape
WARNING: this API is experimental and will likely change in the near future.
Constructor and Description |
---|
AbstractPolygon() |
Modifier and Type | Method and Description |
---|---|
abstract double |
fastGetX(int index)
Get the X coordinate of the Point at
index . |
abstract double |
fastGetY(int index)
Get the Y coordinate of the Point at
index . |
Point |
getPoint(int index)
Get the Point at
index . |
double |
getPointX(int index)
Get the X Coordinate of the Point at
index . |
double |
getPointY(int index)
Get the X Coordinate of the Point at
index . |
protected boolean |
intersects(Rectangle box,
AbstractPolygon poly)
Check for intersection with
poly . |
boolean |
intersects(Rectangle box,
Shape other)
Check if this shape intersects with
other . |
abstract boolean |
lineIntersects(double x1,
double y1,
double x2,
double y2)
Check if the line (x1, y1), (x2, y2) intersects with this polygon.
|
abstract int |
size()
Return the number of vertices in this polygon.
|
addArguments, clone, compareTo, contains, contains, fastIntersects, getBoundingBox, getHeight, getTypeName, getWidth, hashCode, intersects, readExternal, readExternal, toString, toString, toString, valueOf, writeExternal, writeExternal
public final Point getPoint(int index)
index
.public final double getPointX(int index)
index
.public final double getPointY(int index)
index
.public abstract double fastGetX(int index)
index
.
WARNING: this method assumes that index
is positive and
less than size()
.
public abstract double fastGetY(int index)
index
.
WARNING: this method assumes that index
is positive and
less than size()
.
public abstract int size()
public boolean intersects(Rectangle box, Shape other)
other
.intersects
in class Shape
box
- The bounding box of this shape from Shape.getBoundingBox()
.other
- The shape to check for intersection withprotected final boolean intersects(Rectangle box, AbstractPolygon poly)
poly
.box
- This polygon's bounding boxpoly
- Polygon to check intersection with.public abstract boolean lineIntersects(double x1, double y1, double x2, double y2)
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.