MvtBatchedLineTile

class MvtBatchedLineTile(features: List<MvtBatchedLineTile.BatchLineFeature>, boundingSector: Sector, displayName: String? = null) : AbstractRenderable

Batched line-stroke renderable for one MVT slippy tile.

One shared VBO + one shared EBO per Globe.State. Polylines that share the same (colorPacked, lineWidth) bucket are concatenated into a single index-buffer range, separated by degenerate GL_TRIANGLE_STRIP bridges so each bucket emits exactly ONE DrawShapeState.drawElements call.

Vertex layout matches earth.worldwind.shape.Path's outline format so the existing TriangleShaderProgram (with drawState.isLine = true) renders the strip:

  • VERTEX_STRIDE = 5 floats per GPU vertex (x, y, z, OUTLINE_CORNER_tag, texCoord1d).

  • Each logical waypoint expands to 4 GPU vertices (UL, LL, UR, LR corners). The shader uses the OUTLINE_CORNER tag to compute the perpendicular line-width offset.

  • Position triple is in DEGREE-relative coords (lon_diff_deg, lat_diff_deg, alt_diff); the surface compositor projects to terrain.

Each polyline contributes one leading dummy + K waypoints + 2 trailing dummies. The trailing dummies exist because the line shader's pointC reads two vertex slots past the current — WebGL rejects drawElements otherwise. Only the leading dummy + waypoints contribute indices; trailing dummies are unindexed padding.

Constructors

Link copied to clipboard
constructor(features: List<MvtBatchedLineTile.BatchLineFeature>, boundingSector: Sector, displayName: String? = null)

Types

Link copied to clipboard
data class BatchLineFeature(var coords: DoubleArray, val attributes: ShapeAttributes, val zOrder: Int = 0, val pickPayload: MvtPickedFeature? = null)

One polyline feature pre-resolved into flat [lon°, lat°, …] degree coords, attributes, and z-order; MvtVectorLayer builds these off-thread during the tile fetch.

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 point counts (each polyline point expands to a 4-vertex quad group of VERTEX_STRIDE floats + ~6 indices, 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

Per-frame multiplier applied to every line's width at draw time. Lets MvtVectorLayer smoothly scale line widths between tile-zoom boundaries (a tile baked at z=12 looks 1× thick at camera zoom 12, ~2× thick at camera zoom 13). The layer writes this each frame before calling doRender; default 1.0 = no scale.

Link copied to clipboard
open override var zOrder: Double

Functions

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

Pre-assemble this tile's line vertex array for globeState off the render thread. Line assembly is pure (lon°, lat°) arithmetic — no Globe-dependent ECEF math like the polygon tile needs — but we still gate by globeState so a globe-state change at runtime can invalidate and rebuild.

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 the render-resource cache.

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