|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.bbn.openmap.omGraphics.util.ArcCalc
A class that calculates an arc between two points, given the point coordinates, and an arc measurement that represents, in radians, the length of the part of the circle that should be represented by the arc.
Field Summary | |
protected double |
arcAngle
This setting is the amount of an angle, limited to a semi-circle (PI) that the curve will represent. |
java.awt.Point |
arcCenter
|
protected OMGraphicList |
arcGraphics
|
double |
arcRadius
|
protected boolean |
arcUp
For x-y and offset lines that have an arc drawn between them, tell which way the arc should be drawn, toward the Equator, or away from it, generally. |
double |
distance
|
double |
endSlope
|
protected boolean |
generated
|
double |
inverseSlope
|
java.awt.Point |
midPoint
|
java.awt.Point |
peakPoint
|
protected boolean |
reversed
Set to true if the points for the arc line up from x2, y2 to x1, y1 |
double |
startSlope
|
double |
straightLineSlope
|
protected int[] |
xpoints
|
protected int[] |
ypoints
|
Constructor Summary | |
ArcCalc(double aa,
boolean putArcUp)
Set the arc that is drawn between the points of a x-y or offset line. |
Method Summary | |
void |
generate(int x1,
int y1,
int x2,
int y2)
Generate the points that will generate the curved line between two points. |
double |
getArcAngle()
Return the arc angle set for this line. |
OMGraphicList |
getArcGraphics()
|
protected double |
getRealAngle(int x1,
int y1,
int x2,
int y2)
Given the straight line between two points, figure out the angle, in radians, of that line in relation to the coordinate system on the screen. |
boolean |
getReversed()
|
int[] |
getXPoints()
|
int[] |
getYPoints()
|
boolean |
isArcUp()
Returns true if the arc direction setting is upward, meaning that the peak of the arc is above (or more so) the line that goes between the two points. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected OMGraphicList arcGraphics
protected boolean generated
public double distance
public double straightLineSlope
public double inverseSlope
public java.awt.Point midPoint
public java.awt.Point arcCenter
public java.awt.Point peakPoint
public double startSlope
public double endSlope
public double arcRadius
protected int[] xpoints
protected int[] ypoints
protected double arcAngle
protected boolean arcUp
protected boolean reversed
Constructor Detail |
public ArcCalc(double aa, boolean putArcUp)
aa
- arcAngle, in radians, between 0-PI.putArcUp
- arc peak above points.Method Detail |
public double getArcAngle()
public boolean isArcUp()
public void generate(int x1, int y1, int x2, int y2)
protected double getRealAngle(int x1, int y1, int x2, int y2)
public int[] getXPoints()
public int[] getYPoints()
public OMGraphicList getArcGraphics()
public boolean getReversed()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |