Version 1.5APIs subject to change!

multiverse.server.math
Class Geometry

java.lang.Object
  extended by multiverse.server.math.Geometry
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class Geometry
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable

used in quad tree works with java bean xml serialization

See Also:
Serialized Form

Constructor Summary
Geometry()
           
Geometry(int minX, int maxX, int minZ, int maxZ)
           
 
Method Summary
 java.lang.Object clone()
           
 boolean contains(Geometry g)
           
 boolean contains(Point pt)
           
 Geometry[] divide()
          divides this geometry into 4 equal squares(does not change this obj) and returns the 4 element array 0 1 2 3
 boolean equals(Geometry other)
           
 java.util.Collection<Point> getCorners()
          returns the 4 corners for this geometry
 int getMaxX()
           
 int getMaxZ()
           
 void getMaxZ(int z)
           
 int getMinX()
           
 int getMinZ()
           
 void getMinZ(int z)
           
 boolean isAdjacent(Geometry gOther)
           
static Geometry maxGeometry()
           
 boolean overlaps(Geometry g)
           
 void setMaxX(int x)
           
 void setMinX(int x)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Geometry

public Geometry()

Geometry

public Geometry(int minX,
                int maxX,
                int minZ,
                int maxZ)
Method Detail

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

equals

public boolean equals(Geometry other)

getMinX

public int getMinX()

getMaxX

public int getMaxX()

getMinZ

public int getMinZ()

getMaxZ

public int getMaxZ()

setMinX

public void setMinX(int x)

setMaxX

public void setMaxX(int x)

getMinZ

public void getMinZ(int z)

getMaxZ

public void getMaxZ(int z)

contains

public boolean contains(Point pt)

contains

public boolean contains(Geometry g)

overlaps

public boolean overlaps(Geometry g)

getCorners

public java.util.Collection<Point> getCorners()
returns the 4 corners for this geometry


divide

public Geometry[] divide()
divides this geometry into 4 equal squares(does not change this obj) and returns the 4 element array 0 1 2 3


isAdjacent

public boolean isAdjacent(Geometry gOther)

maxGeometry

public static Geometry maxGeometry()


Copyright © 2008 The Multiverse Network, Inc.