public class GLArrow2 extends GLShape2 implements Shape.OnPointsChangedListener, Arrow.OnTextChangedListener, MapItem.OnAltitudeModeChangedListener
GLMapItem2.OnBoundsChangedListener, GLMapItem2.OnVisibleChangedListener
Modifier and Type | Field and Description |
---|---|
protected java.nio.FloatBuffer |
_arrowHead |
protected int |
_arrowheadVersion |
protected int |
_labelID |
protected GLLabelManager |
_labelManager |
protected GeoPoint[] |
_pts |
protected java.lang.String |
_text |
protected static double |
div_pi_4 |
protected static boolean |
XRAY_ENABLED |
fill, fillColor, stroke, strokeAlpha, strokeBlue, strokeColor, strokeGreen, strokeRed, strokeWeight
bounds, clickable, context, DEFAULT_MAX_ALT, DEFAULT_MIN_ALT, minMapGsd, renderPass, subject, visible, zOrder
Constructor and Description |
---|
GLArrow2(MapRenderer surface,
Arrow arrow) |
Modifier and Type | Method and Description |
---|---|
protected void |
_drawArrowHead()
Expects GL_VERTEX_ARRAY client state to be enabled and _arrowHead
geometry uploaded as vertex pointer
|
protected void |
_setColor(int color) |
protected void |
_validateArrowhead(GLMapView ortho) |
void |
draw(GLMapView ortho,
int renderPass) |
protected boolean |
ensureLabel() |
protected double |
getHae(GLMapView ortho,
GeoPoint geo) |
protected android.graphics.RectF |
getWidgetViewF()
Retrieve the bounding RectF of the current state of the Map.
|
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(Feature.AltitudeMode altitudeMode)
Called when the altitude mode is changed for the specific item
|
void |
onPointsChanged(Shape s) |
void |
onStrokeColorChanged(Shape subject) |
void |
onStrokeWeightChanged(Shape subject) |
void |
onStyleChanged(Shape shape) |
void |
onTextChanged(Arrow arrow) |
void |
release() |
void |
startObserving()
Start observing the subject.
|
void |
stopObserving()
Stops observing the subject.
|
protected void |
updateText(java.lang.String text,
int textColor) |
onFillColorChanged
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, setOpaque
protected final java.nio.FloatBuffer _arrowHead
protected int _labelID
protected java.lang.String _text
protected static final double div_pi_4
protected static final boolean XRAY_ENABLED
protected GeoPoint[] _pts
protected final GLLabelManager _labelManager
protected int _arrowheadVersion
public GLArrow2(MapRenderer surface, Arrow arrow)
public void startObserving()
GLMapItem2
Invoking this method should generally refresh the state of the item.
This method may not be invoked on the GL context thread.
startObserving
in interface GLMapItem2
startObserving
in class GLShape2
public void stopObserving()
AbstractGLMapItem2
AbstractGLMapItem2.startObserving()
.
This method may not be invoked on the GL context thread.
stopObserving
in interface GLMapItem2
stopObserving
in class GLShape2
public void onStyleChanged(Shape shape)
onStyleChanged
in interface Shape.OnStyleChangedListener
onStyleChanged
in class GLShape2
public void onStrokeColorChanged(Shape subject)
onStrokeColorChanged
in interface Shape.OnStrokeColorChangedListener
onStrokeColorChanged
in class GLShape2
public void onStrokeWeightChanged(Shape subject)
onStrokeWeightChanged
in interface Shape.OnStrokeWeightChangedListener
onStrokeWeightChanged
in class GLShape2
public void onAltitudeModeChanged(Feature.AltitudeMode altitudeMode)
MapItem.OnAltitudeModeChangedListener
onAltitudeModeChanged
in interface MapItem.OnAltitudeModeChangedListener
altitudeMode
- The altitude mode that the map item was set toprotected boolean ensureLabel()
protected void _validateArrowhead(GLMapView ortho)
protected android.graphics.RectF getWidgetViewF()
protected void _setColor(int color)
public void onPointsChanged(Shape s)
onPointsChanged
in interface Shape.OnPointsChangedListener
protected double getHae(GLMapView ortho, GeoPoint geo)
public void onTextChanged(Arrow arrow)
onTextChanged
in interface Arrow.OnTextChangedListener
public void release()
release
in class AbstractGLMapItem2
protected void updateText(java.lang.String text, int textColor)
protected void _drawArrowHead()
public void draw(GLMapView ortho, int renderPass)
protected HitTestResult hitTestImpl(MapRenderer3 renderer, HitTestQueryParameters params)
AbstractGLMapItem2
hitTestImpl
in class AbstractGLMapItem2
renderer
- Map rendererparams
- Query parameters