atavism.server.objects
Class Boundary
java.lang.Object
atavism.server.objects.Boundary
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable
public class Boundary
- extends java.lang.Object
- implements java.lang.Cloneable, java.io.Serializable
although we use a 3d point, this boundary is a 2d boundary which only looks
at the X,Z values of the point
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
boundingBox
protected Geometry boundingBox
Boundary
public Boundary()
Boundary
public Boundary(java.lang.String name)
Boundary
public Boundary(java.util.List<Point> points)
setName
public void setName(java.lang.String name)
getName
public java.lang.String getName()
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
clone
public java.lang.Object clone()
- Overrides:
clone
in class java.lang.Object
setPoints
public void setPoints(java.util.List<Point> points)
getPoints
public java.util.List<Point> getPoints()
addPoint
public void addPoint(Point p)
getBoundingBox
public Geometry getBoundingBox()
contains
public boolean contains(Point p)
- returns if the point is contained within this 2d boundary
pick a point outside of the boundary, create a line segment from the
point in question, to the point outside the line. count how many times it
crosses line segments of the boundary. if even, its not inside the
boundary
getMaxBoundary
public static Boundary getMaxBoundary()