Package org.oscim.renderer
Class BucketRenderer
java.lang.Object
org.oscim.renderer.LayerRenderer
org.oscim.renderer.BucketRenderer
- Direct Known Subclasses:
AbstractVectorLayer.Renderer,BitmapRenderer,GridRenderer,LocationTextureRenderer,MarkerRenderer
Base class to use the renderer.elements for drawing.
All methods that modify 'buckets' MUST be synchronized!
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal RenderBucketsBuckets for renderingstatic final org.slf4j.Loggerprotected booleanWrap around datelineprotected booleanprotected MapPositionUse mMapPosition.copy(position) to keep the position for which the Overlay is *compiled*. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcompile()Compile all buckets into one BufferObject.voidrender(GLViewport v) Render all 'buckets'protected voidsetMatrix(GLMatrix mvp, GLViewport v, boolean project, float coordScale) protected voidUtility: Set matrices.mvp matrix relative to the difference of current MapPosition and the last updated Overlay MapPosition and applies view-projection-matrix.protected voidsetMatrix(GLViewport v, boolean project) Utility: Set matrices.mvp matrix relative to the difference of current MapPosition and the last updated Overlay MapPosition.protected voidsetMatrix(GLViewport v, boolean project, float coordScale) voidupdate(GLViewport v) Default implementation: Copy initial Viewport position and compile buckets.Methods inherited from class org.oscim.renderer.LayerRenderer
isReady, setReady, setup
-
Field Details
-
log
public static final org.slf4j.Logger log -
mMapPosition
Use mMapPosition.copy(position) to keep the position for which the Overlay is *compiled*. NOTE: required by setMatrix utility functions to draw this layer fixed to the map -
mFlipOnDateLine
protected boolean mFlipOnDateLineWrap around dateline -
buckets
Buckets for rendering -
mInitialized
protected boolean mInitialized
-
-
Constructor Details
-
BucketRenderer
public BucketRenderer()
-
-
Method Details
-
update
Default implementation: Copy initial Viewport position and compile buckets.- Specified by:
updatein classLayerRenderer
-
render
Render all 'buckets'- Specified by:
renderin classLayerRenderer
-
compile
protected void compile()Compile all buckets into one BufferObject. Sets renderer to be ready when successful. When no data is available (buckets.countVboSize() == 0) then BufferObject will be released and buckets will not be rendered. -
setMatrix
Utility: Set matrices.mvp matrix relative to the difference of current MapPosition and the last updated Overlay MapPosition. Use this to 'stick' your layer to the map. Note: Vertex coordinates are assumed to be scaled by MapRenderer.COORD_SCALE (== 8).- Parameters:
v- GLViewportproject- if true apply view- and projection, or just view otherwise.
-
setMatrix
-
setMatrix
-
setMatrix
Utility: Set matrices.mvp matrix relative to the difference of current MapPosition and the last updated Overlay MapPosition and applies view-projection-matrix.
-