fang
Class Box2D

java.lang.Object
  extended by fang.Box2D

public class Box2D
extends Object


Field Summary
 double height
           
 double width
           
 double x
           
 double y
           
 
Constructor Summary
Box2D()
           
Box2D(Box2D other)
           
Box2D(double left, double top, double width, double height)
           
Box2D(Location2D center, Size2D size)
           
Box2D(Rectangle2D other)
           
 
Method Summary
 boolean contains(Point2D point)
           
 double getBottom()
           
 Location2D getCenter()
           
 double getHeight()
           
 double getLeft()
           
 double getMaxX()
           
 double getMaxY()
           
 double getMinX()
           
 double getMinY()
           
 double getRight()
           
 Size2D getSize()
           
 double getTop()
           
 double getWidth()
           
 double getx()
           
 double getX()
           
 double gety()
           
 double getY()
           
 boolean intersects(Location2D point)
           
 boolean intersects(Sprite sprite)
           
 int outcode(double x, double y)
           
 int outcode(Point2D p)
           
 Rectangle2D Rectangle2D()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

x

public double x

y

public double y

width

public double width

height

public double height
Constructor Detail

Box2D

public Box2D()

Box2D

public Box2D(double left,
             double top,
             double width,
             double height)

Box2D

public Box2D(Location2D center,
             Size2D size)

Box2D

public Box2D(Rectangle2D other)

Box2D

public Box2D(Box2D other)
Method Detail

getWidth

public double getWidth()

getHeight

public double getHeight()

Rectangle2D

public Rectangle2D Rectangle2D()

getCenter

public Location2D getCenter()

getx

public double getx()

gety

public double gety()

getX

public double getX()

getY

public double getY()

getSize

public Size2D getSize()

getMinX

public double getMinX()

getMaxX

public double getMaxX()

getMinY

public double getMinY()

getMaxY

public double getMaxY()

getLeft

public double getLeft()

getTop

public double getTop()

getRight

public double getRight()

getBottom

public double getBottom()

outcode

public int outcode(Point2D p)

outcode

public int outcode(double x,
                   double y)

contains

public boolean contains(Point2D point)

intersects

public boolean intersects(Location2D point)

intersects

public boolean intersects(Sprite sprite)

toString

public String toString()
Overrides:
toString in class Object