public class GLPolyline extends GLShape2 implements Shape.OnPointsChangedListener, Shape.OnBasicLineStyleChangedListener, Polyline.OnLabelsChangedListener, Polyline.OnLabelTextSizeChanged, MapItem.OnAltitudeModeChangedListener, Polyline.OnHeightStyleChangedListener, MapItem.OnHeightChangedListener
GLMapItem2.OnBoundsChangedListener, GLMapItem2.OnVisibleChangedListener| Modifier and Type | Field and Description |
|---|---|
protected boolean |
_nadirClamp |
protected boolean |
_needsUpdate |
protected int |
_pointsSize |
protected java.nio.FloatBuffer |
_verts2 |
protected long |
_verts2Ptr |
protected int |
_verts2Size
XY = 2, XYZ = 3; subclasses may set in constructor
|
AltitudeMode |
altitudeMode |
protected int |
basicLineStyle |
protected long |
currentDraw |
protected static double |
div_180_pi |
protected GLBatchLineString |
impl |
protected boolean |
needsProjectVertices |
protected int |
numPoints |
protected boolean |
recompute |
static java.lang.String |
TAG |
fill, fillColor, stroke, strokeAlpha, strokeBlue, strokeColor, strokeGreen, strokeRed, strokeWeightbounds, clickable, context, DEFAULT_MAX_ALT, DEFAULT_MIN_ALT, minMapGsd, renderPass, subject, visible, zOrder| Constructor and Description |
|---|
GLPolyline(MapRenderer surface,
Polyline subject) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
_ensureVertBuffer() |
protected void |
_projectVerts(GLMapView ortho)
TODO 4.4: Utilize the batch line string we already have instead of
creating a duplicate vertex buffer (_verts2).
|
void |
draw(GLMapView ortho,
int renderPass) |
protected AltitudeMode |
getAltitudeMode()
Get the current altitude mode which takes into account the
ClampToGroundControl |
protected static android.graphics.RectF |
getDefaultWidgetViewF(MapRenderer ctx)
TODO: Currently a direct copy from GLMapItem - but will be rewritten / removed when the final
version is done.
|
protected android.graphics.RectF |
getWidgetViewF()
TODO: Currently a direct copy from GLMapItem - but will be reritten / removed when the final
version is done.
|
protected HitTestResult |
hitTestImpl(MapRenderer3 renderer,
HitTestQueryParameters params)
Perform a hit test on this map item
Sub-classes should override this method for hit-testing
|
void |
onAltitudeModeChanged(AltitudeMode altitudeMode)
Called when the altitude mode is changed for the specific item
|
void |
onBasicLineStyleChanged(Shape polyline) |
void |
onFillColorChanged(Shape shape) |
void |
onHeightChanged(MapItem item) |
void |
onHeightStyleChanged(Polyline p)
Height style flag has been modified
This flag controls how 3D extruded height is drawn
|
void |
onLabelsChanged(Polyline polyline) |
void |
onLabelTextSizeChanged(Polyline p) |
void |
onPointsChanged(Shape polyline) |
void |
onStrokeColorChanged(Shape shape) |
void |
onStrokeWeightChanged(Shape shape) |
void |
onStyleChanged(Shape shape) |
void |
release() |
void |
startObserving()
Start observing the subject.
|
void |
stopObserving()
Stops observing the subject.
|
protected void |
updateNadirClamp(GLMapView ortho)
Sync the NADIR clamp boolean with the current clamp to ground setting
|
protected void |
updatePointsImpl() |
protected void |
updatePointsImpl(GeoPoint center,
GeoPoint[] points) |
protected boolean |
uses2DPointBuffer()
Whether points should be stored in a 2D or 3D point buffer
(if altitude should be ignored or not)
XXX - We always need 3D points for hit testing to work properly
with perspective rendering
|
protected void |
validateLabels(GLMapView ortho) |
addBoundsListener, addVisibleListener, dispatchOnBoundsChanged, dispatchOnVisibleChanged, forward, forward, forward, forward, forward, forward, forward, getBounds, getClampToGroundAtNadir, getClickable, getMinDrawResolution, getOpaque, getRenderPass, getSubject, getZOrder, hitTest, isVisible, markSurfaceDirty, onClickableChanged, onVisibleChanged, onZOrderChanged, removeBoundsListener, removeVisibleListener, runOnGLThread, setClampToGroundAtNadir, setOpaquepublic static final java.lang.String TAG
protected int numPoints
protected int _pointsSize
protected boolean _needsUpdate
protected java.nio.FloatBuffer _verts2
protected int _verts2Size
protected long _verts2Ptr
protected int basicLineStyle
protected static final double div_180_pi
protected long currentDraw
protected boolean recompute
public AltitudeMode altitudeMode
protected final GLBatchLineString impl
protected boolean needsProjectVertices
protected boolean _nadirClamp
public GLPolyline(MapRenderer surface,
Polyline subject)
public void startObserving()
GLMapItem2Invoking this method should generally refresh the state of the item.
This method may not be invoked on the GL context thread.
startObserving in interface GLMapItem2startObserving in class GLShape2public void stopObserving()
AbstractGLMapItem2AbstractGLMapItem2.startObserving().
This method may not be invoked on the GL context thread.
stopObserving in interface GLMapItem2stopObserving in class GLShape2public void onAltitudeModeChanged(AltitudeMode altitudeMode)
MapItem.OnAltitudeModeChangedListeneronAltitudeModeChanged in interface MapItem.OnAltitudeModeChangedListeneraltitudeMode - The altitude mode that the map item was set topublic void onStyleChanged(Shape shape)
onStyleChanged in interface Shape.OnStyleChangedListeneronStyleChanged in class GLShape2public void onFillColorChanged(Shape shape)
onFillColorChanged in interface Shape.OnFillColorChangedListeneronFillColorChanged in class GLShape2public void onStrokeColorChanged(Shape shape)
onStrokeColorChanged in interface Shape.OnStrokeColorChangedListeneronStrokeColorChanged in class GLShape2public void onStrokeWeightChanged(Shape shape)
onStrokeWeightChanged in interface Shape.OnStrokeWeightChangedListeneronStrokeWeightChanged in class GLShape2public void onPointsChanged(Shape polyline)
onPointsChanged in interface Shape.OnPointsChangedListenerprotected void updatePointsImpl(GeoPoint center,
GeoPoint[] points)
protected void updatePointsImpl()
protected AltitudeMode getAltitudeMode()
ClampToGroundControlprotected boolean uses2DPointBuffer()
public void onBasicLineStyleChanged(Shape polyline)
onBasicLineStyleChanged in interface Shape.OnBasicLineStyleChangedListenerpublic void onLabelsChanged(Polyline polyline)
onLabelsChanged in interface Polyline.OnLabelsChangedListenerpublic void onHeightChanged(MapItem item)
onHeightChanged in interface MapItem.OnHeightChangedListenerpublic void onHeightStyleChanged(Polyline p)
Polyline.OnHeightStyleChangedListeneronHeightStyleChanged in interface Polyline.OnHeightStyleChangedListenerp - Polylinepublic void draw(GLMapView ortho,
int renderPass)
protected void updateNadirClamp(GLMapView ortho)
ortho - Map viewprotected void validateLabels(GLMapView ortho)
protected android.graphics.RectF getWidgetViewF()
protected static android.graphics.RectF getDefaultWidgetViewF(MapRenderer ctx)
ctx - protected void _ensureVertBuffer()
protected void _projectVerts(GLMapView ortho)
protected HitTestResult hitTestImpl(MapRenderer3 renderer,
HitTestQueryParameters params)
AbstractGLMapItem2hitTestImpl in class AbstractGLMapItem2renderer - Map rendererparams - Query parameterspublic void onLabelTextSizeChanged(Polyline p)
onLabelTextSizeChanged in interface Polyline.OnLabelTextSizeChangedpublic void release()
release in class AbstractGLMapItem2