|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
An Oriented Box is a rectangle that is rotated about its bottom right corner. The BoxInformation class presents a unified interface to both BoundingBoxes and OrientedBoxes, as well as any other shape that fits the definition.
Method Summary | |
java.lang.Object |
clone()
|
boolean |
contains(Pnt point)
Tests to see if the specified point is within this rectangle |
Pnt |
getCentroid()
A rational approximation of the box's centroid. |
int |
getHeight()
Gets the height of the box. |
Pnt |
getNearIntersection(Pnt q1)
Get the point of intersection between the ray from the centroid of this box through q1 that is closest to q1. |
int |
getRotation()
Gets the number of degrees the box is rotated counterclockwise about its origin. |
int |
getWidth()
Gets the width of the box. |
int |
getX()
Gets the x-coordinate of the box's origin. |
int |
getY()
Gets the y-coordinate of the box's origin. |
Method Detail |
public int getX()
public int getY()
public int getWidth()
public int getHeight()
public int getRotation()
public Pnt getCentroid()
public boolean contains(Pnt point)
point
- the point to test
true
iff the point is within
this rectanglepublic Pnt getNearIntersection(Pnt q1)
q1
- A point that is not the centroid.
public java.lang.Object clone()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |