|
NASA World Wind | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectgov.nasa.worldwind.symbology.milstd2525.graphics.TriangleWavePositionIterator
public class TriangleWavePositionIterator
Iterator that computes the positions required to draw a triangle wave along a line specified by control positions. The generated wave looks like this:
/\ /\ <--- Amplitude
/ \ / \
________/ \_________/ \_____
^ ^
| Wave length|
| Field Summary | |
|---|---|
protected double |
amplitude
Amplitude of the wave, in meters. |
protected Position |
firstPosition
First position along the line. |
protected Globe |
globe
Globe used to compute geographic positions. |
protected Angle |
halfWaveLength
Wavelength, as a geographic angle. |
protected Position |
nextControlPosition
Position of the next control point. |
protected Iterator<? extends Position> |
positions
Control positions. |
protected int |
state
Current state of the state machine. |
protected static int |
STATE_FIRST
Initial state. |
protected static int |
STATE_LINE
Drawing connecting line between waves. |
protected static int |
STATE_TOOTH_PEAK
At peak of wave. |
protected static int |
STATE_WAVE_START
About to draw wave. |
protected Position |
thisPosition
Current position. |
protected double |
thisStep
Distance (in meters) to the next wave start or end. |
protected Position |
waveEndPosition
End position for the current wave. |
| Constructor Summary | |
|---|---|
TriangleWavePositionIterator(Iterable<? extends Position> positions,
double waveLength,
double amplitude,
Globe globe)
Create a new iterator to compute the positions of a triangle wave. |
|
| Method Summary | |
|---|---|
protected Position |
computeNext()
Compute the next position along the line, and transition the state machine to the next state (if appropriate). |
boolean |
hasNext()
|
Position |
next()
|
void |
remove()
Not supported. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected double amplitude
protected Position firstPosition
protected Globe globe
protected Angle halfWaveLength
protected Position nextControlPosition
protected Iterator<? extends Position> positions
protected int state
protected static final int STATE_FIRST
protected static final int STATE_LINE
protected static final int STATE_TOOTH_PEAK
protected static final int STATE_WAVE_START
protected Position thisPosition
protected double thisStep
protected Position waveEndPosition
| Constructor Detail |
|---|
public TriangleWavePositionIterator(Iterable<? extends Position> positions,
double waveLength,
double amplitude,
Globe globe)
positions - Control positions for the triangle wave line.waveLength - Distance (in meters) between waves.amplitude - Amplitude (in meters) of the wave. This is the distance from the base line to the tip of each
triangular wave.globe - Globe used to compute geographic positions.| Method Detail |
|---|
protected Position computeNext()
public boolean hasNext()
hasNext in interface Iteratorpublic Position next()
next in interface Iteratorpublic void remove()
remove in interface Iterator
|
NASA World Wind | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||