com.azalient.api.a.position
Interface IPolygon


public interface IPolygon

A generic polygon used as the base class for more complex shapes. Each polygon has a set of vertices and a "central" point, often used for a label. The "central" point does not need to be in the centre.


Field Summary
static IPolygon[] ZERO
           
 
Method Summary
 IXyz centralPoint()
          Returns the location of the central point
 void centralPoint(IXyz t)
          Set the location of the central point
 boolean contains(IXyz p)
          Returns true if given point is inside the boundary of the polygon
 IObstacle overlapping(IObstacle obstacle)
           
 boolean overlapping(IPolygon that)
          Returns true if this polygon overlaps the given one
 void translate(IXyz ab)
          Translate all the vertices of this polygon
 IXyz[] vertices()
          The vertices defining the boundary of the polygon
 

Field Detail

ZERO

static final IPolygon[] ZERO
Method Detail

vertices

IXyz[] vertices()
The vertices defining the boundary of the polygon


translate

void translate(IXyz ab)
Translate all the vertices of this polygon


centralPoint

void centralPoint(IXyz t)
Set the location of the central point


centralPoint

IXyz centralPoint()
Returns the location of the central point


overlapping

IObstacle overlapping(IObstacle obstacle)
Internal - Not recommended for use. Public as a side-effect of implementation method

overlapping

boolean overlapping(IPolygon that)
Returns true if this polygon overlaps the given one


contains

boolean contains(IXyz p)
Returns true if given point is inside the boundary of the polygon