|
NASA World Wind | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectgov.nasa.worldwind.avlist.AVListImpl
gov.nasa.worldwind.WWObjectImpl
gov.nasa.worldwind.render.AbstractShape
gov.nasa.worldwind.render.Path
gov.nasa.worldwind.render.MultiResolutionPath
public class MultiResolutionPath
A Version of Path that provides level-of-detail. Positions in a Path are filtered based on a "skip
count", the number of positions to skip between positions that are drawn. The skip-count algorithm can be replaced by
the application. The default algorithm skips up to four positions, depending on the eye distance from the positions.
Also, if the segment between any two positions is too small to be distinguished, it is not drawn. See makePositions(DrawContext, gov.nasa.worldwind.render.Path.PathData).
| Nested Class Summary | |
|---|---|
protected static class |
MultiResolutionPath.MultiResolutionPathData
Subclass of PathData that adds the capability to map which ordinal number corresponds to each rendered position. |
static interface |
MultiResolutionPath.SkipCountComputer
This interface provides the means for the application to specify the algorithm used to determine the number of specified positions skipped during path tessellation. |
| Nested classes/interfaces inherited from class gov.nasa.worldwind.render.Path |
|---|
Path.PathData, Path.PathPickSupport, Path.PickablePositions, Path.PositionColors |
| Nested classes/interfaces inherited from class gov.nasa.worldwind.render.AbstractShape |
|---|
AbstractShape.AbstractShapeData |
| Field Summary | |
|---|---|
protected MultiResolutionPath.SkipCountComputer |
skipCountComputer
The default implementation of SkipCountComputer. |
| Fields inherited from interface gov.nasa.worldwind.Exportable |
|---|
FORMAT_NOT_SUPPORTED, FORMAT_PARTIALLY_SUPPORTED, FORMAT_SUPPORTED |
| Constructor Summary | |
|---|---|
MultiResolutionPath(Iterable<? extends Position> positions)
Creates a path with specified positions. |
|
MultiResolutionPath(Position.PositionList positions)
Creates a path with specified positions specified via a generic list. |
|
| Method Summary | |
|---|---|
protected void |
addTessellatedPosition(Position pos,
Color color,
Integer ordinal,
Path.PathData pathData)
Adds a position to this path's tessellatedPositions list. |
protected AbstractShape.AbstractShapeData |
createCacheEntry(DrawContext dc)
Creates and returns a new cache entry specific to the subclass. |
protected Integer |
getOrdinal(int positionIndex)
Returns the ordinal number corresponding to the position. |
MultiResolutionPath.SkipCountComputer |
getSkipCountComputer()
Indicates the SkipCountComputer that is used to determine the number of specified positions skipped during path tessellation. |
protected void |
makePositions(DrawContext dc,
Path.PathData pathData)
Overridden to skip positions from this Path's original positions list. |
protected void |
makeTessellatedPositions(DrawContext dc,
Path.PathData pathData)
Generates positions defining this path with path type and terrain-conforming properties applied. |
void |
setSkipCountComputer(MultiResolutionPath.SkipCountComputer computer)
Specifies the SkipCountComputer that determines the number of specified positions skipped during path tessellation. |
| Methods inherited from class gov.nasa.worldwind.WWObjectImpl |
|---|
onMessage, propertyChange |
| Methods inherited from class gov.nasa.worldwind.avlist.AVListImpl |
|---|
addPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getBooleanValue, getBooleanValue, getChangeSupport, getDoubleValue, getDoubleValue, getEntries, getIntegerValue, getIntegerValue, getLongValue, getLongValue, getRestorableStateForAVPair, getStringValue, getStringValue, getStringValue, getValue, getValues, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValue, setValues |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface gov.nasa.worldwind.avlist.AVList |
|---|
addPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getEntries, getStringValue, getValue, getValues, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValue, setValues |
| Field Detail |
|---|
protected MultiResolutionPath.SkipCountComputer skipCountComputer
SkipCountComputer. This implementation returns a value of 4 when the
eye distance to the path is greater than 10e3, a value of 2 when the eye distance is greater than 1e3 meters but
less then 10e3, and a value of 1 when the eye distance is less than 1e3.
| Constructor Detail |
|---|
public MultiResolutionPath(Iterable<? extends Position> positions)
positions - the path positions. This reference is retained by this shape; the positions are not copied. If
any positions in the set change, Path.setPositions(Iterable) must be called to inform this
shape of the change.
IllegalArgumentException - if positions is null.public MultiResolutionPath(Position.PositionList positions)
positions - the path positions. This reference is retained by this shape; the positions are not copied. If
any positions in the set change, Path.setPositions(Iterable) must be called to inform this
shape of the change.
IllegalArgumentException - if positions is null.| Method Detail |
|---|
protected void addTessellatedPosition(Position pos,
Color color,
Integer ordinal,
Path.PathData pathData)
tessellatedPositions list. If the specified color is not
null, this adds the color to this path's tessellatedColors list. If the specified
ordinal is not null, this adds the position's index to the polePositions and
positionPoints index buffers.
Overridden to create a mapping between the current tessellated position and the specified ordinal, if the ordinal
is not null.
addTessellatedPosition in class Pathpos - the position to add.color - the color corresponding to the position. May be null to indicate that the position
has no associated color.ordinal - the ordinal number corresponding to the position's location in the original position list. May be
null to indicate that the position is not one of the originally specified
positions.pathData - the current globe-specific path data.protected AbstractShape.AbstractShapeData createCacheEntry(DrawContext dc)
createCacheEntry in class Pathdc - the current draw context.
protected Integer getOrdinal(int positionIndex)
getOrdinal in class PathpositionIndex - the position's index.
public MultiResolutionPath.SkipCountComputer getSkipCountComputer()
protected void makePositions(DrawContext dc,
Path.PathData pathData)
makePositions in class Path
protected void makeTessellatedPositions(DrawContext dc,
Path.PathData pathData)
tessellatedPositions and polePositions fields.
Overridden to initialize and build the PathData's positionOrdinals buffer.
makeTessellatedPositions in class Pathdc - the current draw context.pathData - the current globe-specific path data.public void setSkipCountComputer(MultiResolutionPath.SkipCountComputer computer)
computer - the SkipCountComputer to use during path tessellation.
IllegalArgumentException - if the computer is null.
|
NASA World Wind | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||