perf(lab): stream sealed spatial playback tracks

This commit is contained in:
DCCONSTRUCTIONS
2026-08-27 15:18:45 +03:00
parent b70dc4298a
commit bf76304e00
10 changed files with 911 additions and 50 deletions
+21
View File
@@ -344,6 +344,27 @@ class RecordedGeometryStore:
points.setflags(write=False)
return points
def playback_points_map(self) -> FloatArray:
"""Expose the sealed contiguous map-point track for binary LAB playback.
The returned array is the exact source-pack point index space. It is
read-only and deliberately excludes any UI projection or resampling so
the browser can retain it once and derive the current increment by the
verified offsets below.
"""
points = np.asarray(self._source["cloud_points_map"], dtype=np.dtype("<f4"))
if not points.flags.c_contiguous:
raise GeometryProviderError("source playback point track is not contiguous")
points.setflags(write=False)
return points
def playback_point_offsets(self) -> tuple[int, ...]:
"""Return immutable offsets into :meth:`playback_points_map`."""
offsets = np.asarray(self._source["cloud_offsets"], dtype=np.int64)
return tuple(int(value) for value in offsets)
def point_step_candidates_for_frame(self, frame_index: int) -> UInt8Array | None:
"""Expose the sealed low-step diagnostic in the source point index space.