org.starhope.appius.geometry
Interface PolygonPrimitive<T extends PolygonPrimitive<?>>

Type Parameters:
T - the specific subclass implementing this interface
All Known Implementing Classes:
Circle, Polygon, Rectangle

public interface PolygonPrimitive<T extends PolygonPrimitive<?>>

Base polygon class for 2D shapes

Author:
ewinkelman

Method Summary
 boolean contains(Coord2D coord2d)
          Determines if the polygon contains that point
 boolean contains(double x, double y)
          Determines if the polygon contains that point
 Coord2D getCenter()
           
 Coord2D[] intersection(LineSeg2D lsSeg2d)
          Finds the intersection points for the polygon with the line segment
 boolean intersects(LineSeg2D lSeg2d)
          Determines if the polygon intersects the line segment
 boolean intersects(PolygonPrimitive<?> polygon)
          Determines if the polygon intersects a polygon
 boolean intersectsCircle(Circle circle)
          Determines if the polygon intersects a circle
 boolean intersectsPoly(Polygon polygon)
          Determines if the polygon intersects a polygon
 boolean intersectsRect(Rectangle rectangle)
          Determines if the polygon intersects a rectangle
 T scale(double sizeScalar)
          WRITEME: Document this method brpocock@star-hope.org
 T translate(Coord2D coord2d)
          WRITEME: Document this method brpocock@star-hope.org
 T translate(double x, double y)
          Translates the object
 

Method Detail

contains

boolean contains(Coord2D coord2d)
Determines if the polygon contains that point

Parameters:
coord2d - WRITEME
Returns:
WRITEME

contains

boolean contains(double x,
                 double y)
Determines if the polygon contains that point

Parameters:
x - WRITEME
y - WRITEME
Returns:
WRITEME

getCenter

Coord2D getCenter()
Returns:
the center point

intersection

Coord2D[] intersection(LineSeg2D lsSeg2d)
Finds the intersection points for the polygon with the line segment

Parameters:
lsSeg2d - WRITEME
Returns:
WRITEME

intersects

boolean intersects(LineSeg2D lSeg2d)
Determines if the polygon intersects the line segment

Parameters:
lSeg2d - WRITEME
Returns:
WRITEME

intersects

boolean intersects(PolygonPrimitive<?> polygon)
Determines if the polygon intersects a polygon

Parameters:
polygon - WRITEME
Returns:
WRITEME

intersectsCircle

boolean intersectsCircle(Circle circle)
Determines if the polygon intersects a circle

Parameters:
circle - WRITEME
Returns:
WRITEME

intersectsPoly

boolean intersectsPoly(Polygon polygon)
Determines if the polygon intersects a polygon

Parameters:
polygon - WRITEME
Returns:
WRITEME

intersectsRect

boolean intersectsRect(Rectangle rectangle)
Determines if the polygon intersects a rectangle

Parameters:
rectangle - WRITEME
Returns:
WRITEME

scale

T scale(double sizeScalar)
WRITEME: Document this method brpocock@star-hope.org

Parameters:
sizeScalar - WRITEME
Returns:
WRITEME

translate

T translate(Coord2D coord2d)
WRITEME: Document this method brpocock@star-hope.org

Parameters:
coord2d - The amount to move
Returns:
WRITEME

translate

T translate(double x,
            double y)
Translates the object

Parameters:
x - The amount to move on the x-axis
y - The amount to move on the y-axis
Returns:
WRITEME