mako5.math.phys
Class BoundingRect
java.lang.Object
mako5.math.phys.Bounds
mako5.math.phys.BoundingRect
public class BoundingRect
- extends Bounds
A bounding rectangle.
- Version:
- 08-Mar 2006, 09-Mar 2006
- Author:
- Paul Jarrett
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. |
BoundingRect
public BoundingRect(R2v rLoc_,
float fWidth_,
float fHeight_)
- Makes a new Bounding Rectangle.
- Parameters:
rLoc_
- the location to alias for this bounding rectfWidth_
- the width of this bounding rectfHeight_
- the height of this bounding rect- Since:
- 08-Mar 2006
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