mako5.math.phys
Class BoundingRect

java.lang.Object
  extended by mako5.math.phys.Bounds
      extended by mako5.math.phys.BoundingRect

public class BoundingRect
extends Bounds

A bounding rectangle.

Version:
08-Mar 2006, 09-Mar 2006
Author:
Paul Jarrett

Field Summary
 
Fields inherited from class mako5.math.phys.Bounds
BOUNDARY, CIRCLE, LINE, RECT
 
Constructor Summary
BoundingRect(R2v rLoc_, float fWidth_, float fHeight_)
          Makes a new Bounding Rectangle.
 
Method Summary
 float getHeight()
          Returns the height of this rectangle.
 float getWidth()
          Returns the width of this rectangle.
 boolean isCollision(R2v rPoint_)
          Returns true if this collides with the given point.
 
Methods inherited from class mako5.math.phys.Bounds
aliasLoc, getLocation, getType, testCollision, testCollision
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BoundingRect

public BoundingRect(R2v rLoc_,
                    float fWidth_,
                    float fHeight_)
Makes a new Bounding Rectangle.

Parameters:
rLoc_ - the location to alias for this bounding rect
fWidth_ - the width of this bounding rect
fHeight_ - the height of this bounding rect
Since:
08-Mar 2006
Method Detail

getWidth

public float getWidth()
Returns the width of this rectangle.

Returns:
the width of this rectangle
Since:
08-Mar 2006

getHeight

public float getHeight()
Returns the height of this rectangle.

Returns:
the height of this rectangle
Since:
08-Mar 2006

isCollision

public boolean isCollision(R2v rPoint_)
Returns true if this collides with the given point.

Specified by:
isCollision in class Bounds
Parameters:
rPoint_ - the point to test this against
Returns:
true if it collides with the given point
Since:
08-Mar 2006, 09-Mar 2006