|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjsky.coords.CoordinateRadius
public class CoordinateRadius
Represents a generic center coordinate and radius range (or width and height), Some methods are provided to check if another coordinate point lies within the range. The coordinates and radius (or width and height) values are treated in a generic way.
Field Summary | |
---|---|
protected Coordinates |
centerPosition
Center position in a supported coordinate system |
protected double |
height
Height about the center (optional) |
protected double |
maxRadius
Max radius from center |
protected double |
minRadius
Min radius from center |
protected double |
width
Width about the center (optional) |
Constructor Summary | |
---|---|
CoordinateRadius(Coordinates pos,
double maxRadius)
Initialize from the given center position and radius. |
|
CoordinateRadius(Coordinates pos,
double minRadius,
double maxRadius)
Initialize from the given center position and radius range. |
|
CoordinateRadius(Coordinates pos,
double maxRadius,
double width,
double height)
Initialize from the given center position, width and height. |
|
CoordinateRadius(Coordinates pos,
double minRadius,
double maxRadius,
double width,
double height)
Initialize from the given center position, width and height. |
Method Summary | |
---|---|
boolean |
contains(Coordinates pos)
Return true if the given coordinate position lies within the region defined by this object. |
Coordinates |
getCenterPosition()
Return the center position. |
double |
getHeight()
Return the height, if set, otherwise 0. |
double |
getMaxRadius()
Return the max radius value. |
double |
getMinRadius()
Return the min radius value. |
double |
getWidth()
Return the width, if set, otherwise 0. |
java.lang.String |
toString()
Return coordinates and radius as a string. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected Coordinates centerPosition
protected double minRadius
protected double maxRadius
protected double width
protected double height
Constructor Detail |
---|
public CoordinateRadius(Coordinates pos, double minRadius, double maxRadius)
pos
- the center position.minRadius
- the minimum radius from the center positionmaxRadius
- the maximum radius from the center positionpublic CoordinateRadius(Coordinates pos, double maxRadius)
pos
- the center position.maxRadius
- the maximum radius from the center positionpublic CoordinateRadius(Coordinates pos, double maxRadius, double width, double height)
pos
- the center position.maxRadius
- the maximum radius from the center positionwidth
- the width of the image area, about the centerheight
- the height of the image area, about the centerpublic CoordinateRadius(Coordinates pos, double minRadius, double maxRadius, double width, double height)
pos
- the center position.width
- the width of the image area, about the centerheight
- the height of the image area, about the centerminRadius
- the minimum radius from the center positionmaxRadius
- the maximum radius from the center positionMethod Detail |
---|
public Coordinates getCenterPosition()
public double getMinRadius()
public double getMaxRadius()
public double getWidth()
public double getHeight()
public boolean contains(Coordinates pos)
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |