public class ArcCalc
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Field and Description |
---|---|
protected double |
arcAngle
This setting is the amount of an angle, limited to a
semi-circle (PI) that the curve will represent.
|
protected OMGraphicList |
arcGraphics
Debugging list showing algorithm points.
|
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.
|
protected boolean |
reversed
Set to true if the points for the arc line up from x2, y2 to
x1, y1
|
protected float[] |
xpoints |
protected float[] |
ypoints |
Constructor and Description |
---|
ArcCalc(double aa,
boolean putArcUp)
Set the arc that is drawn between the points of a x-y or offset
line.
|
Modifier and Type | Method and Description |
---|---|
void |
generate(int x1,
int y1,
int x2,
int y2)
Generate the points that will generate the curved line between
two points.
|
void |
generate(Projection proj) |
double |
getArcAngle()
Return the arc angle set for this line.
|
OMGraphicList |
getArcGraphics() |
protected double |
getRealAngle(float x1,
float y1,
float x2,
float 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() |
float[] |
getXPoints() |
float[] |
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.
|
void |
render(java.awt.Graphics g) |
protected transient OMGraphicList arcGraphics
protected transient float[] xpoints
protected transient float[] ypoints
protected double arcAngle
protected boolean arcUp
protected boolean reversed
public ArcCalc(double aa, boolean putArcUp)
aa
- arcAngle, in radians, between 0-PI.putArcUp
- arc peak above points.public double getArcAngle()
public boolean isArcUp()
public void generate(int x1, int y1, int x2, int y2)
protected double getRealAngle(float x1, float y1, float x2, float y2)
public float[] getXPoints()
public float[] getYPoints()
public void generate(Projection proj)
public void render(java.awt.Graphics g)
public OMGraphicList getArcGraphics()
public boolean getReversed()
Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details