public class GLRubberModel extends AbstractGLMapItem2 implements Shape.OnPointsChangedListener, AbstractSheet.OnAlphaChangedListener, AbstractSheet.OnLoadListener, RubberModel.OnChangedListener, Shape.OnStrokeColorChangedListener
GLMapItem2.OnBoundsChangedListener, GLMapItem2.OnVisibleChangedListener
Modifier and Type | Field and Description |
---|---|
protected float |
_alpha |
protected GeoPoint |
_anchorPoint |
protected int |
_color |
protected ColorControl[] |
_ctrl |
protected int |
_drawVersion |
protected GLMesh[] |
_glMeshes |
protected MaterialManager |
_matManager |
protected Matrix |
_matrix |
protected boolean |
_meshesLocked |
protected Model |
_model |
protected PointD |
_modelAnchorPoint |
protected double[] |
_modelDim |
protected ModelInfo |
_modelInfo |
protected boolean |
_noLod |
protected boolean |
_onScreen |
protected boolean |
_readyToRender |
protected boolean |
_released |
protected MapRenderer |
_renderCtx |
protected MapSceneModel |
_scene |
protected RubberModel |
_subject |
bounds, clickable, context, DEFAULT_MAX_ALT, DEFAULT_MIN_ALT, minMapGsd, renderPass, subject, visible, zOrder
Constructor and Description |
---|
GLRubberModel(MapRenderer ctx,
RubberModel subject) |
Modifier and Type | Method and Description |
---|---|
protected GLMesh[] |
createGLMeshes() |
void |
draw(GLMapView view,
int renderPass) |
protected boolean |
getClickable()
Determine whether or not this item is touchable
By default this is tied to
MapItem.getClickable() |
boolean |
hitTest(int xpos,
int ypos,
GeoPoint result,
MapView view)
Deprecated.
|
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 |
onAlphaChanged(AbstractSheet sheet,
int alpha) |
void |
onAltitudeChanged(RubberModel model,
double altitude,
GeoPoint.AltitudeReference reference)
Center point altitude has been changed (by itself)
Note that this is not called when the point lat/lng has changed
|
protected void |
onDrawVersionChanged(GLMapView view) |
void |
onLoadProgress(AbstractSheet sheet,
int progress) |
void |
onLoadStateChanged(AbstractSheet sheet,
LoadState ls) |
void |
onPointsChanged(Shape shape) |
protected void |
onRefresh() |
void |
onRotationChanged(RubberModel model,
double[] rotation)
Model pitch or roll has been changed
Note that this is not called for heading, listen for onPointsChanged
instead
|
void |
onStrokeColorChanged(Shape s) |
void |
release() |
protected void |
requestRefresh() |
void |
setOnScreen(boolean onScreen)
Flag the model as being onscreen according to the last layer query
|
protected boolean |
shouldRender() |
void |
startObserving()
Start observing the subject.
|
void |
stopObserving()
Stops observing the subject.
|
void |
updateDrawVersion(GLMapView view) |
addBoundsListener, addVisibleListener, dispatchOnBoundsChanged, dispatchOnVisibleChanged, forward, forward, forward, forward, forward, forward, forward, getBounds, getClampToGroundAtNadir, getMinDrawResolution, getOpaque, getRenderPass, getSubject, getZOrder, hitTest, isVisible, markSurfaceDirty, onClickableChanged, onVisibleChanged, onZOrderChanged, removeBoundsListener, removeVisibleListener, runOnGLThread, setClampToGroundAtNadir, setOpaque
protected final MapRenderer _renderCtx
protected final RubberModel _subject
protected int _color
protected float _alpha
protected ColorControl[] _ctrl
protected Model _model
protected ModelInfo _modelInfo
protected final Matrix _matrix
protected final GeoPoint _anchorPoint
protected PointD _modelAnchorPoint
protected final double[] _modelDim
protected int _drawVersion
protected boolean _readyToRender
protected boolean _onScreen
protected boolean _noLod
protected GLMesh[] _glMeshes
protected boolean _meshesLocked
protected MaterialManager _matManager
protected boolean _released
protected MapSceneModel _scene
public GLRubberModel(MapRenderer ctx, RubberModel subject)
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 AbstractGLMapItem2
public void stopObserving()
AbstractGLMapItem2
AbstractGLMapItem2.startObserving()
.
This method may not be invoked on the GL context thread.
stopObserving
in interface GLMapItem2
stopObserving
in class AbstractGLMapItem2
public void onAlphaChanged(AbstractSheet sheet, int alpha)
onAlphaChanged
in interface AbstractSheet.OnAlphaChangedListener
public void onStrokeColorChanged(Shape s)
onStrokeColorChanged
in interface Shape.OnStrokeColorChangedListener
public void onLoadStateChanged(AbstractSheet sheet, LoadState ls)
onLoadStateChanged
in interface AbstractSheet.OnLoadListener
public void onLoadProgress(AbstractSheet sheet, int progress)
onLoadProgress
in interface AbstractSheet.OnLoadListener
public void onPointsChanged(Shape shape)
onPointsChanged
in interface Shape.OnPointsChangedListener
public void onRotationChanged(RubberModel model, double[] rotation)
RubberModel.OnChangedListener
onRotationChanged
in interface RubberModel.OnChangedListener
model
- Model instancerotation
- The new rotation arraypublic void onAltitudeChanged(RubberModel model, double altitude, GeoPoint.AltitudeReference reference)
RubberModel.OnChangedListener
onAltitudeChanged
in interface RubberModel.OnChangedListener
model
- Model instancealtitude
- New altitude in metersreference
- Altitude referenceprotected void requestRefresh()
protected void onRefresh()
public void draw(GLMapView view, int renderPass)
protected boolean shouldRender()
protected void onDrawVersionChanged(GLMapView view)
public void updateDrawVersion(GLMapView view)
protected GLMesh[] createGLMeshes()
public void release()
release
in class AbstractGLMapItem2
public void setOnScreen(boolean onScreen)
onScreen
- True if the model is on screenprotected boolean getClickable()
AbstractGLMapItem2
MapItem.getClickable()
getClickable
in class AbstractGLMapItem2
protected HitTestResult hitTestImpl(MapRenderer3 renderer, HitTestQueryParameters params)
AbstractGLMapItem2
hitTestImpl
in class AbstractGLMapItem2
renderer
- Map rendererparams
- Query parameters@Deprecated public boolean hitTest(int xpos, int ypos, GeoPoint result, MapView view)
AbstractGLMapItem2.hitTest(MapRenderer3, HitTestQueryParameters)