org.vectomatic.common.model.geometry
Class BoundingBox

java.lang.Object
  extended by org.vectomatic.common.model.geometry.BoundingBox
All Implemented Interfaces:
com.google.gwt.user.client.rpc.IsSerializable

public class BoundingBox
extends Object
implements com.google.gwt.user.client.rpc.IsSerializable

Class to represent a 2D bounding box


Field Summary
static int PT_C
           
static int PT_E
           
static int PT_N
           
static int PT_NE
           
static int PT_NW
           
static int PT_R
           
static int PT_S
           
static int PT_SE
           
static int PT_SW
           
static int PT_W
           
static BoundingBox UNIT_BOX
           
 float xmax
           
 float xmin
           
 float ymax
           
 float ymin
           
 
Constructor Summary
BoundingBox()
           
BoundingBox(BoundingBox bbox)
           
BoundingBox(float xmin, float ymin, float xmax, float ymax)
           
 
Method Summary
 boolean containsPoint(Point p)
           
 boolean equals(Object o)
           
 float getHeight()
           
 Point getPoint(int pt, Point p)
           
 float getWidth()
           
 float getXCenter()
           
 float getYCenter()
           
 int hashCode()
           
 BoundingBox parseString(String str)
           
 String toString()
           
 BoundingBox union(BoundingBox bbox)
           
 BoundingBox union(BoundingBox bbox, BoundingBox dest)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

UNIT_BOX

public static final BoundingBox UNIT_BOX

PT_NW

public static final int PT_NW
See Also:
Constant Field Values

PT_SW

public static final int PT_SW
See Also:
Constant Field Values

PT_SE

public static final int PT_SE
See Also:
Constant Field Values

PT_NE

public static final int PT_NE
See Also:
Constant Field Values

PT_N

public static final int PT_N
See Also:
Constant Field Values

PT_W

public static final int PT_W
See Also:
Constant Field Values

PT_S

public static final int PT_S
See Also:
Constant Field Values

PT_E

public static final int PT_E
See Also:
Constant Field Values

PT_C

public static final int PT_C
See Also:
Constant Field Values

PT_R

public static final int PT_R
See Also:
Constant Field Values

xmin

public float xmin

xmax

public float xmax

ymin

public float ymin

ymax

public float ymax
Constructor Detail

BoundingBox

public BoundingBox()

BoundingBox

public BoundingBox(BoundingBox bbox)

BoundingBox

public BoundingBox(float xmin,
                   float ymin,
                   float xmax,
                   float ymax)
Method Detail

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

union

public BoundingBox union(BoundingBox bbox)

union

public BoundingBox union(BoundingBox bbox,
                         BoundingBox dest)

getPoint

public Point getPoint(int pt,
                      Point p)

getXCenter

public float getXCenter()

getYCenter

public float getYCenter()

getWidth

public float getWidth()

getHeight

public float getHeight()

containsPoint

public boolean containsPoint(Point p)

toString

public String toString()
Overrides:
toString in class Object

parseString

public BoundingBox parseString(String str)


Copyright © 2010. All Rights Reserved.