|
NASA World Wind | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgov.nasa.worldwind.render.Polyline
public class Polyline
Field Summary | |
---|---|
static int |
ANTIALIAS_DONT_CARE
|
static int |
ANTIALIAS_FASTEST
|
static int |
ANTIALIAS_NICEST
|
static int |
GREAT_CIRCLE
|
static int |
LINEAR
|
static int |
LOXODROME
|
static int |
RHUMB_LINE
|
Constructor Summary | |
---|---|
Polyline()
|
|
Polyline(java.lang.Iterable<LatLon> positions,
double elevation)
|
|
Polyline(java.lang.Iterable<Position> positions)
|
Method Summary | |
---|---|
int |
getAntiAliasHint()
|
java.awt.Color |
getColor()
|
java.awt.Color |
getHighlightColor()
|
double |
getLength()
Returns the length of the line as drawn. |
double |
getLineWidth()
|
int |
getNumSubsegments()
|
double |
getOffset()
|
int |
getPathType()
|
java.lang.Iterable<Position> |
getPositions()
|
Position |
getReferencePosition()
|
java.lang.String |
getRestorableState()
Returns an XML state document String describing the public attributes of this Polyline. |
int |
getStippleFactor()
|
short |
getStipplePattern()
|
double |
getTerrainConformance()
|
boolean |
isClosed()
|
boolean |
isFilled()
|
boolean |
isFollowTerrain()
|
boolean |
isHighlighted()
|
protected void |
makeVertices(DrawContext dc)
|
void |
move(Position delta)
Shift the shape over the globe's surface while maintaining its original azimuth -- its orientation relative to North. |
void |
moveTo(Position position)
Move the shape over the globe's surface while maintaining its original azimuth -- its orientation relative to North. |
void |
render(DrawContext dc)
Causes this Renderable to render itself using the DrawContext provided. |
void |
restoreState(java.lang.String stateInXml)
Restores publicly settable attribute values found in the specified XML state document String. |
void |
setAntiAliasHint(int hint)
|
void |
setClosed(boolean closed)
|
void |
setColor(java.awt.Color color)
|
void |
setFilled(boolean filled)
|
void |
setFollowTerrain(boolean followTerrain)
Indicates whether the path should follow the terrain's surface. |
void |
setHighlightColor(java.awt.Color highlightColor)
|
void |
setHighlighted(boolean highlighted)
|
void |
setLineWidth(double lineWidth)
|
void |
setNumSubsegments(int numSubsegments)
Specifies the number of intermediate segments to draw for each segment between positions. |
void |
setOffset(double offset)
Specifies an offset, in meters, to add to the path points when the path's follow-terrain attribute is true. |
void |
setPathType(int pathType)
Sets the type of path to draw, one of GREAT_CIRCLE , which draws each segment of the path as a great
circle, LINEAR , which determines the intermediate positions between segments by interpolating the
segment endpoints, or RHUMB_LINE , which draws each segment of the path as a line of constant heading. |
void |
setPositions(java.lang.Iterable<LatLon> inPositions,
double elevation)
Sets the paths positions as latitude and longitude values at a constant altitude. |
void |
setPositions(java.lang.Iterable<Position> inPositions)
Specifies the path's positions. |
void |
setStippleFactor(int stippleFactor)
Sets the stipple factor for specifying line types other than solid. |
void |
setStipplePattern(short stipplePattern)
Sets the stipple pattern for specifying line types other than solid. |
void |
setTerrainConformance(double terrainConformance)
Specifies the precision to which the path follows the terrain when the follow-terrain attribute is true. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int ANTIALIAS_DONT_CARE
public static final int ANTIALIAS_FASTEST
public static final int ANTIALIAS_NICEST
public static final int GREAT_CIRCLE
public static final int LINEAR
public static final int LOXODROME
public static final int RHUMB_LINE
Constructor Detail |
---|
public Polyline()
public Polyline(java.lang.Iterable<LatLon> positions, double elevation)
public Polyline(java.lang.Iterable<Position> positions)
Method Detail |
---|
public int getAntiAliasHint()
public java.awt.Color getColor()
public java.awt.Color getHighlightColor()
public double getLength()
public double getLineWidth()
public int getNumSubsegments()
public double getOffset()
public int getPathType()
public java.lang.Iterable<Position> getPositions()
public Position getReferencePosition()
getReferencePosition
in interface Movable
public java.lang.String getRestorableState()
getRestorableState
in interface Restorable
public int getStippleFactor()
public short getStipplePattern()
public double getTerrainConformance()
public boolean isClosed()
public boolean isFilled()
public boolean isFollowTerrain()
public boolean isHighlighted()
protected void makeVertices(DrawContext dc)
public void move(Position delta)
Movable
move
in interface Movable
delta
- the latitude and longitude to add to the shapes reference position.public void moveTo(Position position)
Movable
moveTo
in interface Movable
position
- the new position of the shapes reference position.public void render(DrawContext dc)
Renderable
Renderable
to render itself using the DrawContext
provided. The
DrawContext
provides the elevation model, openGl instance, globe and other information required for
drawing. It is recommended that the DrawContext
is non-null as most implementations do not support
null DrawContext
s.
render
in interface Renderable
dc
- the DrawContext
to be usedDrawContext
public void restoreState(java.lang.String stateInXml)
stateInXml
must be a well formed XML document String, or this will throw an
IllegalArgumentException. Unknown structures in stateInXml
are benign, because they will
simply be ignored.
restoreState
in interface Restorable
stateInXml
- an XML document String describing a Polyline.
java.lang.IllegalArgumentException
- If stateInXml
is null, or if stateInXml
is not
a well formed XML document String.public void setAntiAliasHint(int hint)
public void setClosed(boolean closed)
public void setColor(java.awt.Color color)
public void setFilled(boolean filled)
public void setFollowTerrain(boolean followTerrain)
true
, the elevation
values in this path's positions are ignored and the path is drawn on the terrain surface. Otherwise the path is
drawn according to the elevations given in the path's positions. If following the terrain, the path may also have
an offset. See setOffset(double)
;
followTerrain
- true
to follow the terrain, otherwise false
.public void setHighlightColor(java.awt.Color highlightColor)
public void setHighlighted(boolean highlighted)
public void setLineWidth(double lineWidth)
public void setNumSubsegments(int numSubsegments)
numSubsegments
- the number of intermediate subsegments.public void setOffset(double offset)
setFollowTerrain(boolean)
.
offset
- the path pffset in meters.public void setPathType(int pathType)
GREAT_CIRCLE
, which draws each segment of the path as a great
circle, LINEAR
, which determines the intermediate positions between segments by interpolating the
segment endpoints, or RHUMB_LINE
, which draws each segment of the path as a line of constant heading.
pathType
- the type of path to draw.public void setPositions(java.lang.Iterable<LatLon> inPositions, double elevation)
inPositions
- the latitudes and longitudes of the positions.elevation
- the elevation to assign each position.public void setPositions(java.lang.Iterable<Position> inPositions)
inPositions
- the path positions.public void setStippleFactor(int stippleFactor)
setStipplePattern(short)
.
stippleFactor
- the stipple factor.public void setStipplePattern(short stipplePattern)
setStippleFactor(int)
.
stipplePattern
- the stipple pattern.public void setTerrainConformance(double terrainConformance)
terrainConformance
- the path conformance in pixels.
|
NASA World Wind | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |