public class PointGrid extends WWObjectImpl implements OrderedRenderable, Highlightable
Modifier and Type | Class and Description |
---|---|
protected static class |
PointGrid.Attributes |
Modifier and Type | Field and Description |
---|---|
protected PointGrid.Attributes |
activeAttributes |
protected int |
altitudeMode |
protected boolean |
applyVerticalExaggeration |
protected List<Position> |
corners |
protected FloatBuffer |
currentPoints |
protected static long |
DEFAULT_GEOMETRY_GENERATION_INTERVAL
The default geometry regeneration interval, in milliseconds.
|
protected static Color |
DEFAULT_HIGHLIGHT_POINT_COLOR
The highlight color to use when none is specified
|
protected static Double |
DEFAULT_HIGHLIGHT_SCALE
The scale to use when highlighting if no highlight attributes are specified.
|
protected static Color |
DEFAULT_POINT_COLOR
The color to use when none is specified
|
protected static Double |
DEFAULT_POINT_SIZE
The point size to use when none is specified.
|
protected static PointGrid.Attributes |
defaultAttributes
The attributes used if attributes are not specified.
|
protected Extent |
extent |
protected double |
eyeDistance |
protected long |
frameID |
protected long |
geometryRegenerationInterval |
protected PointGrid.Attributes |
highlightAttrs |
protected boolean |
highlighted |
protected boolean |
highlightOnePosition |
protected PointGrid.Attributes |
normalAttrs |
protected int |
numPositions |
protected Layer |
pickLayer |
protected PickSupport |
pickSupport |
protected Iterable<? extends Position> |
positions |
protected double |
previousExaggeration |
protected long |
visGeomRegenFrame |
protected boolean |
visible |
Constructor and Description |
---|
PointGrid() |
PointGrid(List<Position> corners,
Iterable<? extends Position> positions,
Integer numPositions) |
Modifier and Type | Method and Description |
---|---|
protected void |
beginDrawing(DrawContext dc)
Establish the OpenGL state needed to draw Paths.
|
protected Extent |
computeExtentAndEyeDistance(DrawContext dc) |
protected FloatBuffer |
computeGridPoints(DrawContext dc,
FloatBuffer coords) |
protected Vec4 |
computePoint(DrawContext dc,
Position pos) |
protected void |
determineActiveAttributes() |
protected Color |
determineHighlightColor() |
protected Double |
determineHighlightPointSize() |
protected void |
doDrawOrderedRenderable(DrawContext dc)
Draws the points as an ordered renderable.
|
protected void |
drawOrderedRenderable(DrawContext dc)
Draws the path as an ordered renderable.
|
protected void |
drawPoints(DrawContext dc) |
protected void |
endDrawing(DrawContext dc)
Pop the state set in beginDrawing.
|
PointGrid.Attributes |
getActiveAttributes() |
int |
getAltitudeMode() |
PointGrid.Attributes |
getAttributes() |
List<Position> |
getCorners() |
double |
getDistanceFromEye()
Returns the ordered renderable's distance from the current view's eye point.
|
Extent |
getExtent() |
long |
getGeometryRegenerationInterval() |
PointGrid.Attributes |
getHighlightAttributes() |
int |
getNumPositions() |
Iterable<? extends Position> |
getPositions() |
protected boolean |
intersectsFrustum(DrawContext dc)
Determines whether the points intersect the view frustum.
|
boolean |
isApplyVerticalExaggeration() |
boolean |
isHighlighted()
Indicates whether to highlight the shape.
|
boolean |
isHighlightOnePosition() |
boolean |
isVisible() |
protected void |
makeOrderedRenderable(DrawContext dc)
If the scene controller is rendering ordered renderables, this method draws this placemark's image as an ordered
renderable.
|
protected boolean |
mustRegenerateGeometry(DrawContext dc) |
void |
pick(DrawContext dc,
Point pickPoint)
Executes a pick of the ordered renderable.
|
protected void |
pickPoints(DrawContext dc) |
void |
render(DrawContext dc)
Causes this
Renderable to render itself using the provided draw context. |
void |
setAltitudeMode(int altitudeMode) |
void |
setApplyVerticalExaggeration(boolean applyVerticalExaggeration) |
void |
setAttributes(PointGrid.Attributes normalAttrs) |
void |
setCorners(List<Position> corners) |
protected void |
setExtent(Extent extent) |
void |
setHighlightAttributes(PointGrid.Attributes highlightAttrs) |
void |
setHighlighted(boolean highlighted)
Specifies whether to highlight the shape.
|
void |
setHighlightOnePosition(boolean highlightOnePosition) |
protected void |
setPointColor(DrawContext dc,
Color color) |
protected void |
setPointSize(DrawContext dc,
Double size) |
void |
setPositions(Iterable<? extends Position> positions,
Integer numPositions) |
void |
setVisible(boolean visible) |
onMessage, propertyChange
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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getEntries, getStringValue, getValue, getValues, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValue, setValues
protected PointGrid.Attributes activeAttributes
protected int altitudeMode
protected boolean applyVerticalExaggeration
protected FloatBuffer currentPoints
protected static final long DEFAULT_GEOMETRY_GENERATION_INTERVAL
protected static final Color DEFAULT_HIGHLIGHT_POINT_COLOR
protected static final Double DEFAULT_HIGHLIGHT_SCALE
protected static final Color DEFAULT_POINT_COLOR
protected static final Double DEFAULT_POINT_SIZE
protected static final PointGrid.Attributes defaultAttributes
protected Extent extent
protected double eyeDistance
protected long frameID
protected long geometryRegenerationInterval
protected PointGrid.Attributes highlightAttrs
protected boolean highlighted
protected boolean highlightOnePosition
protected PointGrid.Attributes normalAttrs
protected int numPositions
protected Layer pickLayer
protected PickSupport pickSupport
protected double previousExaggeration
protected long visGeomRegenFrame
protected boolean visible
protected void beginDrawing(DrawContext dc)
dc
- the current draw context.protected Extent computeExtentAndEyeDistance(DrawContext dc)
protected FloatBuffer computeGridPoints(DrawContext dc, FloatBuffer coords)
protected Vec4 computePoint(DrawContext dc, Position pos)
protected void determineActiveAttributes()
protected Color determineHighlightColor()
protected Double determineHighlightPointSize()
protected void doDrawOrderedRenderable(DrawContext dc)
dc
- the current draw context.protected void drawOrderedRenderable(DrawContext dc)
dc
- the current draw context.protected void drawPoints(DrawContext dc)
protected void endDrawing(DrawContext dc)
dc
- the current draw context.public PointGrid.Attributes getActiveAttributes()
public int getAltitudeMode()
public PointGrid.Attributes getAttributes()
public double getDistanceFromEye()
getDistanceFromEye
in interface OrderedRenderable
public Extent getExtent()
public long getGeometryRegenerationInterval()
public PointGrid.Attributes getHighlightAttributes()
public int getNumPositions()
protected boolean intersectsFrustum(DrawContext dc)
dc
- the current draw context.public boolean isApplyVerticalExaggeration()
public boolean isHighlighted()
isHighlighted
in interface Highlightable
public boolean isHighlightOnePosition()
public boolean isVisible()
protected void makeOrderedRenderable(DrawContext dc)
dc
- the current draw context.protected boolean mustRegenerateGeometry(DrawContext dc)
public void pick(DrawContext dc, Point pickPoint)
pick
in interface OrderedRenderable
dc
- the current draw context.pickPoint
- the pick point.protected void pickPoints(DrawContext dc)
public void render(DrawContext dc)
Renderable
to render itself using the provided draw context.render
in interface Renderable
dc
- the DrawContext
to be usedDrawContext
public void setAltitudeMode(int altitudeMode)
public void setApplyVerticalExaggeration(boolean applyVerticalExaggeration)
public void setAttributes(PointGrid.Attributes normalAttrs)
protected void setExtent(Extent extent)
public void setHighlightAttributes(PointGrid.Attributes highlightAttrs)
public void setHighlighted(boolean highlighted)
setHighlighted
in interface Highlightable
highlighted
- true to highlight the shape, otherwise false.public void setHighlightOnePosition(boolean highlightOnePosition)
protected void setPointColor(DrawContext dc, Color color)
protected void setPointSize(DrawContext dc, Double size)
public void setVisible(boolean visible)