SplatData class Gaussian splatting

The CPU-side contents of a Gaussian splat set as flat, index-parallel arrays (one entry per splat).

The seam between the file parsers, procedural construction, and the renderer. Parsers produce a SplatData, and GaussianSplats packs one into GPU textures.

Constructors

SplatData({required int count, required Float32List positions, required Float32List scales, required Float32List rotations, required Float32List colors, required Float32List opacities, Float32List? sh, int shDegree = 0})
Wraps existing arrays without copying. Every array's length must match count times its per-splat stride.
SplatData.zeroed(int count, {int shDegree = 0})
Allocates a zero-filled splat set for count splats, for callers that fill the arrays in place (procedural construction).
factory

Properties

colors Float32List
Base RGB color per splat, the evaluated degree-0 spherical-harmonic term, in the file's SplatColorSpace.
final
count int
The number of splats.
final
hashCode int
The hash code for this object.
no setterinherited
opacities Float32List
Opacity in 0, 1 per splat (parsers apply the training sigmoid).
final
positions Float32List
Splat centers in local space, x, y, z per splat.
final
rotations Float32List
Unit orientation quaternions, x, y, z, w per splat.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scales Float32List
Per-axis Gaussian standard deviations in local units (already linear; parsers apply the training log-space exp), x, y, z per splat.
final
sh Float32List?
Rest (degree >= 1) spherical-harmonic coefficients, or null when shDegree is 0.
final
shDegree int
The highest spherical-harmonic degree carried by sh (0, 1, or 2).
final

Methods

computeBounds({double sigmaPadding = 3.0}) → Aabb3?
Computes the axis-aligned bounds of the splat centers, each padded by sigmaPadding times the splat's largest axis scale so the visible footprint stays inside the box.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

shRestCoeffCount(int degree) int
Rest (beyond degree 0) SH coefficients per splat and channel, 0 at degree 0, 3 at 1, 8 at 2.