GaussianContent

GPU-resident container for a single Gaussian-splat 3D Tiles tile. Sealed TileContent variant parallel to MeshContent / PointCloudContent; the GPU buffer slots reflect what a Gaussian-splat renderer needs (positions, anisotropic scales, rotation quaternions, opacity, and either flat RGBA or view-dependent spherical harmonic coefficients).

Lifecycle:

  1. prepareGaussianContent runs off the render thread on the parse coroutine, captures per-attribute float arrays, quantizes centres to int16 (for the sort), computes the bounding sphere.

  2. syncGaussianContentGpu runs each render frame, looking up each attribute's VBO from the cache and re-uploading the kept-alive payload when LRU eviction has dropped it. After the first sync the float CPU arrays are dropped; the int16 centres + the sort indices stay alive to feed resortByCamera.

  3. resortByCamera runs each render frame: launches the bucket sort on Dispatchers.Default when the camera direction has moved past the angle gate, then enqueues the resulting indices for GL upload on the next render frame. Stationary or slow camera pays nothing; in-flight sorts block restart until the upload drains.

A concrete Gaussian-splat codec (earth.worldwind.layer.ogc3d.content.spz.SpzGaussianLoader) produces a GaussianPayload; the built-in rasterizer (earth.worldwind.layer.ogc3d.draw.DrawableTileGaussian) renders the splats as GL_POINTS with a Gaussian falloff per fragment.

Properties

Link copied to clipboard

Flipped to true on the first successful syncGaussianContentGpu 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 prepareGaussianContent.

Link copied to clipboard
Link copied to clipboard

Number of splats; populated by prepareGaussianContent.

Functions

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

Drops GPU resources. Idempotent.