MvtBatchedPolygonTile

class MvtBatchedPolygonTile(features: List<MvtBatchedPolygonTile.BatchFeature>, boundingSector: Sector, minHoleAreaDeg2: Double = 0.0, displayName: String? = null) : AbstractRenderable

Batched polygon-fill renderable for one MVT slippy tile.

One VBO + one EBO per Globe.State, regardless of polygon count. Triangles are grouped by (zOrder, colorPacked) and one DrawShapeState.drawElements call is issued per bucket. Buffer keys are shared across buckets so sub-draws don't allocate extra GL buffers.

Scope:

Each feature's outer ring + holes are triangulated by earcut (ear-clipping) — the triangulator Mapbox/MapLibre use for MVT fills; far cheaper than a GLU sweep-line tessellator (no half-edge mesh allocation). earcut normalises winding itself, so input rings need no particular orientation.

Constructors

Link copied to clipboard
constructor(features: List<MvtBatchedPolygonTile.BatchFeature>, boundingSector: Sector, minHoleAreaDeg2: Double = 0.0, displayName: String? = null)

Types

Link copied to clipboard
class BatchFeature(var outer: DoubleArray, var holes: List<DoubleArray>, val attributes: ShapeAttributes, val zOrder: Int = 0, val pickPayload: MvtPickedFeature? = null)

One polygon feature pre-resolved into rings + style attributes. MvtVectorLayer builds this list off-thread during the tile fetch; MvtBatchedPolygonTile.assembleGeometry then turns it into GPU-friendly geometry on the render thread.

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
open override var displayName: String?
Link copied to clipboard

Approximate GPU byte footprint (VBO + EBO) for LRU byte-weighting. Once assembled it's the exact array bytes; before assembly it estimates from source vertex counts (VERTEX_STRIDE floats/vertex for the VBO + ~3 triangle indices/vertex for the EBO, 4 bytes each).

Link copied to clipboard
open override var isEnabled: Boolean
Link copied to clipboard
open override var isPickEnabled: Boolean
Link copied to clipboard
open override var pickDelegate: Any?
Link copied to clipboard
open override var zOrder: Double

Functions

Link copied to clipboard
fun assemble(globe: Globe, globeState: Globe.State?)

Pre-assemble this tile's geometry off the render thread (one assembler per instance at a time). doRender lazy-assembles as a fallback. globe/globeState are unused — vertices are degree-space, so one assembly serves every globe state; kept for call-site symmetry.

Link copied to clipboard
open override fun <T> getUserProperty(key: Any): T?
Link copied to clipboard
open override fun hasUserProperty(key: Any): Boolean
Link copied to clipboard
open override fun putUserProperty(key: Any, value: Any): Any?
Link copied to clipboard

Drop this tile's GL buffer entries from earth.worldwind.render.RenderResourceCache for every cached globe state. Called by MvtVectorLayer on LRU eviction so the kernel reclaims GPU pages eagerly instead of waiting for cache pressure.

Link copied to clipboard
open override fun removeUserProperty(key: Any): Any?
Link copied to clipboard
open override fun render(rc: RenderContext)