PointCloudContent

GPU-resident point cloud content for a single pnts tile. Single VBO with interleaved [posX, posY, posZ, colorR, colorG, colorB, colorA] (7 floats = 28 bytes per point). Color is normalized to 0, 1 floats at parse time to keep the shader path simple.

Lifecycle:

  1. preparePointCloudContent runs off the render thread on the parse coroutine, interleaves position + colour into interleavedVertices, and computes the local bounding sphere.

  2. syncPointCloudContentGpu runs each render frame, looking up the VBO from the cache and re-uploading interleavedVertices when the cache has dropped it. The CPU-side payload stays alive on the content for this re-upload path.

4x memory overhead vs packed uint8 RGBA, but the all-float layout means we reuse the existing NumericArray.Floats upload pipeline without introducing a Bytes variant.

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Flipped to true on the first successful syncPointCloudContentGpu call.

Link copied to clipboard
open override var gpuByteCount: Int

Approximate GPU footprint of this content in bytes, page-aligned by the cache.

Link copied to clipboard

Tile-local-space bounding sphere — computed during preparePointCloudContent.

Link copied to clipboard

Number of points; populated by preparePointCloudContent.

Link copied to clipboard

RTC_CENTER offset to compose with the tile-to-world transform.

Link copied to clipboard

Vertex stride in bytes (28 = 7 floats).

Functions

Link copied to clipboard
open override fun release(dc: DrawContext)

Drops GPU resources. Idempotent.