NASA World Wind

gov.nasa.worldwind.render
Class Path.PathData

java.lang.Object
  extended by gov.nasa.worldwind.avlist.AVListImpl
      extended by gov.nasa.worldwind.cache.ShapeDataCache.ShapeDataCacheEntry
          extended by gov.nasa.worldwind.render.AbstractShape.AbstractShapeData
              extended by gov.nasa.worldwind.render.Path.PathData
All Implemented Interfaces:
AVList
Direct Known Subclasses:
MultiResolutionPath.MultiResolutionPathData
Enclosing class:
Path

protected static class Path.PathData
extends AbstractShape.AbstractShapeData

Maintains globe-dependent computed data such as Cartesian vertices and extents. One entry exists for each distinct globe that this shape encounters in calls to AbstractShape.render(DrawContext). See AbstractShape.


Field Summary
protected  int colorOffset
          Indicates the offset in number of floats to the first RGBA color tuple in renderedPath.
protected  boolean hasExtrusionPoints
          Indicates whether the rendered path has extrusion points in addition to path points.
protected  IntBuffer polePositions
          Indices to the renderedPath identifying the vertices of the originally specified boundary positions and their corresponding terrain point.
protected  IntBuffer positionPoints
          Indices to the renderedPath identifying the vertices of the originally specified boundary positions.
protected  FloatBuffer renderedPath
          The model coordinate vertices to render, all relative to this shape data's reference center.
protected  ArrayList<Color> tessellatedColors
          The colors corresponding to each tessellated position, or null if the path's positionColors is null.
protected  ArrayList<Position> tessellatedPositions
          The positions formed from applying path type and terrain conformance.
protected  int vertexCount
          Indicates the number of vertices represented by renderedPath.
protected  int vertexStride
          Indicates the stride in number of floats between the first element of consecutive vertices in renderedPath.
 
Fields inherited from class gov.nasa.worldwind.render.AbstractShape.AbstractShapeData
frameNumber, referenceDistance, referencePoint, vboCacheKey
 
Fields inherited from class gov.nasa.worldwind.cache.ShapeDataCache.ShapeDataCacheEntry
extent, eyeDistance, globeStateKey, lastUsed, timer, verticalExaggeration
 
Constructor Summary
Path.PathData(DrawContext dc, Path shape)
           
 
Method Summary
 int getColorOffset()
          Indicates the offset in number of floats to the first RGBA color tuple in renderedPath.
 IntBuffer getPolePositions()
          Returns a buffer of indices into the rendered path (renderedPath that identify the top and bottom vertices of this path's vertical line segments.
 IntBuffer getPositionPoints()
          Returns a buffer of indices into the rendered path (renderedPath that identify the originally specified positions that remain after tessellation.
 FloatBuffer getRenderedPath()
          The Cartesian coordinates of the tessellated positions.
 List<Color> getTessellatedColors()
          Indicates the colors corresponding to each position in tessellatedPositions, or null if the path does not have per-position colors.
 List<Position> getTessellatedPositions()
          The positions resulting from tessellating this path.
 int getVertexCount()
          Indicates the number of vertices in renderedPath.
 int getVertexStride()
          Indicates the stride in number of floats between the first element of consecutive vertices in renderedPath.
 boolean isHasExtrusionPoints()
          Indicates whether this path is extruded and the extrusion points have been computed.
 void setColorOffset(int offset)
          Specifies the offset in number of floats to the first RGBA color tuple in renderedPath.
 void setHasExtrusionPoints(boolean hasExtrusionPoints)
           
 void setPolePositions(IntBuffer polePositions)
           
 void setPositionPoints(IntBuffer posPoints)
           
 void setRenderedPath(FloatBuffer renderedPath)
           
 void setTessellatedColors(ArrayList<Color> tessellatedColors)
          Specifies the colors corresponding to each position in tessellatedPositions, or null to specify that the path does not have per-position colors.
 void setTessellatedPositions(ArrayList<Position> tessellatedPositions)
           
 void setVertexCount(int count)
          Specifies the number of vertices in renderedPath.
 void setVertexStride(int stride)
          Specifies the stride in number of floats between the first element of consecutive vertices in renderedPath.
 
Methods inherited from class gov.nasa.worldwind.render.AbstractShape.AbstractShapeData
getFrameNumber, getReferenceDistance, getReferencePoint, getVboCacheKey, setFrameNumber, setReferenceDistance, setReferencePoint, setVboCacheKey
 
Methods inherited from class gov.nasa.worldwind.cache.ShapeDataCache.ShapeDataCacheEntry
getExtent, getEyeDistance, getGlobeStateKey, getTimer, getVerticalExaggeration, isExpired, isValid, restartTimer, setExpired, setExtent, setEyeDistance, setGlobeStateKey, setTimer, setVerticalExaggeration
 
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
 

Field Detail

colorOffset

protected int colorOffset
Indicates the offset in number of floats to the first RGBA color tuple in renderedPath. This is 0 if renderedPath has no RGBA color tuples.


hasExtrusionPoints

protected boolean hasExtrusionPoints
Indicates whether the rendered path has extrusion points in addition to path points.


polePositions

protected IntBuffer polePositions
Indices to the renderedPath identifying the vertices of the originally specified boundary positions and their corresponding terrain point. This is used to draw vertical lines at those positions when the path is extruded.


positionPoints

protected IntBuffer positionPoints
Indices to the renderedPath identifying the vertices of the originally specified boundary positions. (Not their terrain points as well, as polePositions does.)


renderedPath

protected FloatBuffer renderedPath
The model coordinate vertices to render, all relative to this shape data's reference center. If the path is extruded, the base vertices are interleaved: Vcap, Vbase, Vcap, Vbase, ...


tessellatedColors

protected ArrayList<Color> tessellatedColors
The colors corresponding to each tessellated position, or null if the path's positionColors is null.


tessellatedPositions

protected ArrayList<Position> tessellatedPositions
The positions formed from applying path type and terrain conformance.


vertexCount

protected int vertexCount
Indicates the number of vertices represented by renderedPath.


vertexStride

protected int vertexStride
Indicates the stride in number of floats between the first element of consecutive vertices in renderedPath.

Constructor Detail

Path.PathData

public Path.PathData(DrawContext dc,
                     Path shape)
Method Detail

getColorOffset

public int getColorOffset()
Indicates the offset in number of floats to the first RGBA color tuple in renderedPath. This returns 0 if renderedPath has no RGBA color tuples.

Returns:
the offset in number of floats to the first RGBA color tuple in renderedPath.

getPolePositions

public IntBuffer getPolePositions()
Returns a buffer of indices into the rendered path (renderedPath that identify the top and bottom vertices of this path's vertical line segments.

Returns:
the path's pole positions.

getPositionPoints

public IntBuffer getPositionPoints()
Returns a buffer of indices into the rendered path (renderedPath that identify the originally specified positions that remain after tessellation. These positions are those of the position dots, if drawn.

Returns:
the path's originally specified positions that survived tessellation.

getRenderedPath

public FloatBuffer getRenderedPath()
The Cartesian coordinates of the tessellated positions. If path verticals are enabled, this path also contains the ground points corresponding to the path positions.

Returns:
the Cartesian coordinates of the tessellated positions.

getTessellatedColors

public List<Color> getTessellatedColors()
Indicates the colors corresponding to each position in tessellatedPositions, or null if the path does not have per-position colors.

Returns:
the colors corresponding to each path position, or null if the path does not have per-position colors.

getTessellatedPositions

public List<Position> getTessellatedPositions()
The positions resulting from tessellating this path. If the path's attributes don't cause tessellation, then the positions returned are those originally specified.

Returns:
the positions computed by path tessellation.

getVertexCount

public int getVertexCount()
Indicates the number of vertices in renderedPath.

Returns:
the the number of verices in renderedPath.

getVertexStride

public int getVertexStride()
Indicates the stride in number of floats between the first element of consecutive vertices in renderedPath.

Returns:
the stride in number of floats between vertices in in renderedPath.

isHasExtrusionPoints

public boolean isHasExtrusionPoints()
Indicates whether this path is extruded and the extrusion points have been computed.

Returns:
true if the path is extruded and the extrusion points are computed, otherwise false.

setColorOffset

public void setColorOffset(int offset)
Specifies the offset in number of floats to the first RGBA color tuple in renderedPath. Specify 0 if renderedPath has no RGBA color tuples.

Parameters:
offset - the offset in number of floats to the first RGBA color tuple in renderedPath.

setHasExtrusionPoints

public void setHasExtrusionPoints(boolean hasExtrusionPoints)

setPolePositions

public void setPolePositions(IntBuffer polePositions)

setPositionPoints

public void setPositionPoints(IntBuffer posPoints)

setRenderedPath

public void setRenderedPath(FloatBuffer renderedPath)

setTessellatedColors

public void setTessellatedColors(ArrayList<Color> tessellatedColors)
Specifies the colors corresponding to each position in tessellatedPositions, or null to specify that the path does not have per-position colors. The entries in the specified list must have a one-to-one correspondence with the entries in tessellatedPositions.

Parameters:
tessellatedColors - the colors corresponding to each path position, or null if the path does not have per-position colors.

setTessellatedPositions

public void setTessellatedPositions(ArrayList<Position> tessellatedPositions)

setVertexCount

public void setVertexCount(int count)
Specifies the number of vertices in renderedPath. Specify 0 if renderedPath contains no vertices.

Parameters:
count - the the number of verices in renderedPath.

setVertexStride

public void setVertexStride(int stride)
Specifies the stride in number of floats between the first element of consecutive vertices in renderedPath.

Parameters:
stride - the stride in number of floats between vertices in in renderedPath.

NASA World Wind