Package gov.nasa.worldwind.render
Class Polygon.ShapeData
- java.lang.Object
-
- gov.nasa.worldwind.avlist.AVListImpl
-
- gov.nasa.worldwind.cache.ShapeDataCache.ShapeDataCacheEntry
-
- gov.nasa.worldwind.render.AbstractShape.AbstractShapeData
-
- gov.nasa.worldwind.render.Polygon.ShapeData
-
- All Implemented Interfaces:
AVList
,java.lang.Iterable<Polygon.BoundaryInfo>
- Enclosing class:
- Polygon
protected static class Polygon.ShapeData extends AbstractShape.AbstractShapeData implements java.lang.Iterable<Polygon.BoundaryInfo>
This class holds globe-specific data for this shape. It's managed via the shape-data cache inAbstractShape.AbstractShapeData
.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.List<Polygon.BoundaryInfo>
boundaries
This class holds the per-globe data for this shape.protected GLUTessellatorSupport.CollectIndexListsCallback
cb
This shape's tessellation indices.protected java.nio.FloatBuffer
coordBuffer
The vertex data buffer for this shape data.protected java.nio.IntBuffer
interiorIndicesBuffer
The indices identifying the cap vertices in a shape data's vertex buffer.protected java.nio.FloatBuffer
normalBuffer
The slice of thecoordBuffer
that contains normals.protected int
normalBufferPosition
The index of the first normal in thecoordBuffer
.protected boolean
refillIndexBuffer
Indicates whether the index buffer needs to be filled because a new buffer is used or some other reason.protected boolean
refillIndexVBO
Indicates whether the index buffer's VBO needs to be filled because a new buffer is used or some other reason.protected Matrix
rotationMatrix
The rotation matrix for this shape data.protected boolean
tessellationError
Indicates whether a tessellation error occurred.-
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, timerAdjustedEyeDistance, verticalExaggeration
-
-
Constructor Summary
Constructors Constructor Description ShapeData(DrawContext dc, Polygon shape)
Construct a cache entry using the boundaries of this shape.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Polygon.BoundaryInfo
getOuterBoundaryInfo()
Returns the boundary information for this shape data's outer boundary.Matrix
getRotationMatrix()
Returns this shape data's rotation matrix, if there is one.java.util.Iterator<Polygon.BoundaryInfo>
iterator()
void
setRotationMatrix(Matrix matrix)
Specifies this shape data's rotation matrix.-
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
adjustTimer, 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
-
-
-
-
Field Detail
-
boundaries
protected java.util.List<Polygon.BoundaryInfo> boundaries
This class holds the per-globe data for this shape.
-
rotationMatrix
protected Matrix rotationMatrix
The rotation matrix for this shape data.
-
coordBuffer
protected java.nio.FloatBuffer coordBuffer
The vertex data buffer for this shape data. The first half contains vertex coordinates, the second half contains normals.
-
normalBuffer
protected java.nio.FloatBuffer normalBuffer
The slice of thecoordBuffer
that contains normals.
-
normalBufferPosition
protected int normalBufferPosition
The index of the first normal in thecoordBuffer
.
-
cb
protected GLUTessellatorSupport.CollectIndexListsCallback cb
This shape's tessellation indices.
-
interiorIndicesBuffer
protected java.nio.IntBuffer interiorIndicesBuffer
The indices identifying the cap vertices in a shape data's vertex buffer. Determined when this shape is tessellated, which occurs only once unless the shape's boundaries are re-specified.
-
tessellationError
protected boolean tessellationError
Indicates whether a tessellation error occurred. No more attempts to tessellate will be made if set to true.
-
refillIndexBuffer
protected boolean refillIndexBuffer
Indicates whether the index buffer needs to be filled because a new buffer is used or some other reason.
-
refillIndexVBO
protected boolean refillIndexVBO
Indicates whether the index buffer's VBO needs to be filled because a new buffer is used or some other reason.
-
-
Constructor Detail
-
ShapeData
public ShapeData(DrawContext dc, Polygon shape)
Construct a cache entry using the boundaries of this shape.- Parameters:
dc
- the current draw context.shape
- this shape.
-
-
Method Detail
-
getOuterBoundaryInfo
protected Polygon.BoundaryInfo getOuterBoundaryInfo()
Returns the boundary information for this shape data's outer boundary.- Returns:
- this shape data's outer boundary info.
-
iterator
public java.util.Iterator<Polygon.BoundaryInfo> iterator()
- Specified by:
iterator
in interfacejava.lang.Iterable<Polygon.BoundaryInfo>
-
getRotationMatrix
public Matrix getRotationMatrix()
Returns this shape data's rotation matrix, if there is one.- Returns:
- this shape data's rotation matrix, or null if there isn't one.
-
setRotationMatrix
public void setRotationMatrix(Matrix matrix)
Specifies this shape data's rotation matrix.- Parameters:
matrix
- the new rotation matrix.
-
-