DracoFiles

Reads/writes point clouds compressed with Google's Draco format (.drc), replacing PLYFiles/.ply for the per-frame snapshots written every ~0.33s during object-capture scanning (see SnapshotFiles.exportSnapshot). The heavy lifting -- compressing/decompressing the position + color attributes -- happens behind DracoCodec (native on Android via JNI over the vendored draco C++ library; see core/src/androidMain/cpp).

Unlike PLYFiles (which stashed PLYMetadata as PLY header comments alongside the vertices), metadata here is written into Draco's own binary metadata section as a single string entry -- see buildMetadataText/parseMetadataText -- so it travels inside the same .drc buffer as the geometry rather than a separate sidecar file. The line format of that string mirrors the exact fields PLYFiles.export/exportBinary wrote as comment lines, just without the PLY framing.

Functions

Link copied to clipboard
fun export(points: List<PointCloudVertex>, metadata: PLYMetadata, filePath: Path): Path

Compresses points to Draco and writes them to filePath (must end with .drc), embedding everything PLYFiles used to write as PLY header comments into Draco's binary metadata section instead (see buildMetadataText).

Link copied to clipboard
fun findThumbnailFor(drcFile: Path): Path?
Link copied to clipboard

Decodes the geometry (position + color, no faces -- Draco point clouds carry no topology) of a .drc file previously written by export/exportSnapshot.

Link copied to clipboard

Decodes just the metadata a .drc file carries in Draco's binary metadata section.