Package com.massifmaps.renderers
Class MapRenderer
java.lang.Object
com.massifmaps.renderers.MapRenderer
The map renderer component.
-
Method Summary
Modifier and TypeMethodDescriptionvoidcaptureRendering(RendererCaptureListener listener, boolean waitWhileUpdating) Captures map rendering as a bitmap.voiddrawMaskQuad(long texture, float invWidth, float invHeight) booleanChecks if this object is equal to the specified object.Returns the map renderer listener.Returns the current post-process effect.Returns the terrain renderer (may be null).Returns the current view state.inthashCode()Returns the hash value of this object.voidmultiplyScreenMask(long texture, float invWidth, float invHeight) voidRequests the renderer to refresh the view.
Note that there is normally no need to do this manually,
SDK automatically redraws the view when needed.
The default arguments record the CALL SITE, so a view that never stops redrawing can
say which of the ~30 callers is driving it (logRedrawSources below).voidrequestRedraw(String callerFile) Requests the renderer to refresh the view.
Note that there is normally no need to do this manually,
SDK automatically redraws the view when needed.
The default arguments record the CALL SITE, so a view that never stops redrawing can
say which of the ~30 callers is driving it (logRedrawSources below).voidrequestRedraw(String callerFile, int callerLine) Requests the renderer to refresh the view.
Note that there is normally no need to do this manually,
SDK automatically redraws the view when needed.
The default arguments record the CALL SITE, so a view that never stops redrawing can
say which of the ~30 callers is driving it (logRedrawSources below).voidForgets that the camera has been moved.voidsetMapRendererListener(MapRendererListener listener) Sets the map renderer listener.voidsetPostProcessEffect(PostProcessEffect postProcessEffect) Sets the post-process effect.
-
Method Details
-
equals
Checks if this object is equal to the specified object. -
hashCode
public int hashCode()Returns the hash value of this object. -
resetCameraPlaced
public void resetCameraPlaced()Forgets that the camera has been moved. The view a map is constructed with is the SDK's
own, not a placed camera, and the auto-flatten rule does not judge it - see AutoFlatten. -
getMapRendererListener
Returns the map renderer listener. Can be null.- Returns:
- The map renderer listener.
-
setMapRendererListener
Sets the map renderer listener.- Parameters:
listener- The new map renderer listener. Can be null.
-
getViewState
Returns the current view state.- Returns:
- The current view state.
-
requestRedraw
Requests the renderer to refresh the view.
Note that there is normally no need to do this manually,
SDK automatically redraws the view when needed.
The default arguments record the CALL SITE, so a view that never stops redrawing can
say which of the ~30 callers is driving it (logRedrawSources below). Callers pass
nothing; the compiler fills these in. -
requestRedraw
Requests the renderer to refresh the view.
Note that there is normally no need to do this manually,
SDK automatically redraws the view when needed.
The default arguments record the CALL SITE, so a view that never stops redrawing can
say which of the ~30 callers is driving it (logRedrawSources below). Callers pass
nothing; the compiler fills these in. -
requestRedraw
public void requestRedraw()Requests the renderer to refresh the view.
Note that there is normally no need to do this manually,
SDK automatically redraws the view when needed.
The default arguments record the CALL SITE, so a view that never stops redrawing can
say which of the ~30 callers is driving it (logRedrawSources below). Callers pass
nothing; the compiler fills these in. -
captureRendering
Captures map rendering as a bitmap. This operation is asynchronous and the result is returned via listener callback.- Parameters:
listener- The listener interface that will receive the callback once rendering is available.waitWhileUpdating- If true, delay the capture until all asynchronous processes are finished (for example, until all tiles are loaded).
-
getPostProcessEffect
Returns the current post-process effect. Can be null.- Returns:
- The current post-process effect.
-
setPostProcessEffect
Sets the post-process effect. When set, the map is rendered into an offscreen
buffer and the effect fragment shader produces the final screen output.
Note: this feature is experimental and may change in future SDK versions.- Parameters:
postProcessEffect- The new post-process effect. Can be null.
-
getTerrainRenderer
Returns the terrain renderer (may be null). GL thread only. Internal method. -
drawMaskQuad
public void drawMaskQuad(long texture, float invWidth, float invHeight) -
multiplyScreenMask
public void multiplyScreenMask(long texture, float invWidth, float invHeight)
-