com.partnersoft.v3x.geometry.single
Class Rectangle

java.lang.Object
  extended by com.partnersoft.v3x.geometry.single.Rectangle
All Implemented Interfaces:
java.io.Serializable

public class Rectangle
extends java.lang.Object
implements java.io.Serializable

See Also:
Serialized Form

Field Summary
 float height
           
 float width
           
 float x
           
 float y
           
 
Constructor Summary
Rectangle()
           
Rectangle(double x, double y, double width, double height)
           
Rectangle(float x, float y, float width, float height)
           
 
Method Summary
 boolean contains(float x, float y)
           
 boolean covers(Rectangle nother)
          Returns true if this rectangle covers the given one.
 float getHeight()
           
 float getWidth()
           
 float getX()
           
 float getY()
           
 boolean intersects(Rectangle nother)
          Returns true if the given rectangle intersects this one.
 void setHeight(float argHeight)
           
 void setWidth(float argWidth)
           
 void setX(float argX)
           
 void setY(float argY)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

x

public float x

y

public float y

width

public float width

height

public float height
Constructor Detail

Rectangle

public Rectangle()

Rectangle

public Rectangle(float x,
                 float y,
                 float width,
                 float height)

Rectangle

public Rectangle(double x,
                 double y,
                 double width,
                 double height)
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

contains

public boolean contains(float x,
                        float y)

getX

public float getX()

setX

public void setX(float argX)

getY

public float getY()

setY

public void setY(float argY)

getWidth

public float getWidth()

setWidth

public void setWidth(float argWidth)

getHeight

public float getHeight()

setHeight

public void setHeight(float argHeight)

intersects

public boolean intersects(Rectangle nother)
Returns true if the given rectangle intersects this one.


covers

public boolean covers(Rectangle nother)
Returns true if this rectangle covers the given one.