SplatData.zeroed constructor
Allocates a zero-filled splat set for count splats, for callers that
fill the arrays in place (procedural construction).
Implementation
factory SplatData.zeroed(int count, {int shDegree = 0}) {
return SplatData(
count: count,
positions: Float32List(count * 3),
scales: Float32List(count * 3),
rotations: Float32List(count * 4),
colors: Float32List(count * 3),
opacities: Float32List(count),
sh: shDegree > 0
? Float32List(count * shRestCoeffCount(shDegree) * 3)
: null,
shDegree: shDegree,
);
}