|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectedu.umd.cfar.lamp.viper.geometry.PolyList
edu.umd.cfar.lamp.viper.geometry.ConvexPolygon
edu.umd.cfar.lamp.viper.geometry.OrientedBox
An Oriented Box is a rectangle that is rotated about its bottom right corner.
| Field Summary |
| Fields inherited from class edu.umd.cfar.lamp.viper.geometry.PolyList |
area, bbox, CARVE_POLYS, composed, originals, polys |
| Fields inherited from interface edu.umd.cfar.lamp.viper.geometry.Moveable |
EAST, NORTH, NORTHEAST, NORTHWEST, SOUTH, SOUTHEAST, SOUTHWEST, WEST |
| Constructor Summary | |
OrientedBox()
Constructs the empty oriented box |
|
OrientedBox(int[] params)
Constructs a new oriented box from the given set of five parameters |
|
OrientedBox(int x,
int y,
int width,
int height,
int rotation)
Creates a new oriented box with the specified parameters |
|
OrientedBox(java.lang.String S)
Creates a new Oriented Box from a string representation. |
|
| Method Summary | |
java.lang.Object |
clone()
Copies the box. |
Pnt |
getCentroid()
Gets the approximate center of the box. |
int |
getHeight()
Gets the height of the box. |
int |
getRotation()
Gets the rotation around the origin. |
int |
getWidth()
Gets the width of the box. |
int |
getX()
Gets the x-coordinate of the box origin. |
int |
getY()
Gets the y-coordinate of the box origin. |
protected void |
initPoly()
|
Moveable |
move(int direction,
int distance)
Creates a new copy of this movable item, shifted in the given direction by the given number of pixels. |
void |
set(int x,
int y,
int width,
int height,
int rotation)
Directly change the value of this oriented box. |
Moveable |
shift(int x,
int y)
Shifts the moveable by the given amount. |
java.lang.String |
toString()
Gets a String representation of the oriented box |
static OrientedBox |
valueOf(java.lang.String S)
Creates a new Oriented Box from a string representation. |
| Methods inherited from class edu.umd.cfar.lamp.viper.geometry.ConvexPolygon |
add, addVertex, area, clearPolygon, clip, contains, contains, equals, getIntersection, getNearIntersection, getPolys, initBbox, intersection, isInside, subtract, toStringListOfPoints |
| Methods inherited from class edu.umd.cfar.lamp.viper.geometry.PolyList |
addPoly, clearPolyList, getBoundingBox, getConvexPolygonArray, getFragmentationCount, getOriginals, getPoints, hashCode, intersection, intersects, union |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface edu.umd.cfar.lamp.viper.geometry.BoxInformation |
contains, getNearIntersection |
| Constructor Detail |
public OrientedBox()
public OrientedBox(int[] params)
params - an integer array containing x and y coordinates of the
box origin, width and height of the box, and angle of rotation in degrees,
in that order.
public OrientedBox(int x,
int y,
int width,
int height,
int rotation)
x - the x-coordinate of the origin point.y - the y-coordinate of the origin pointwidth - the width of the boxheight - the height of the boxrotation - the angle of rotation, in degrees.
public OrientedBox(java.lang.String S)
throws BadDataException
S - a string representation
BadDataException - when the string isn't in the valid form| Method Detail |
public static OrientedBox valueOf(java.lang.String S)
S - a string representation
BadAttributeDataException - when the string isn't in the valid form
public void set(int x,
int y,
int width,
int height,
int rotation)
x - the x-coordinate of the originy - the y-coordinate of the originwidth - the width of the boxheight - the height of the boxrotation - the orientation of the boxpublic java.lang.String toString()
toString in class ConvexPolygonpublic java.lang.Object clone()
clone in interface BoxInformationclone in class ConvexPolygonprotected void initPoly()
public int getX()
getX in interface BoxInformationpublic int getY()
getY in interface BoxInformationpublic int getWidth()
getWidth in interface BoxInformationpublic int getHeight()
getHeight in interface BoxInformationpublic int getRotation()
getRotation in interface BoxInformationpublic Pnt getCentroid()
getCentroid in interface BoxInformationgetCentroid in class ConvexPolygon
public Moveable move(int direction,
int distance)
Moveable
move in interface Moveabledirection - the direction to move the itemdistance - the distance to move it
Moveable.move(int, int)
public Moveable shift(int x,
int y)
Moveable
shift in interface Moveablex - y -
Moveable.shift(int, int)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||