mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-10 22:16:41 +00:00
Unify sidecar production via SidecarBuilder
Renamed HeadlessSidecarBuilder to SidecarBuilder and reused it for live loads. SceneLoader now constructs one per stream load, forwards meshReady /instanceReady chunks alongside the viewport upload, and finalizes + writes the sidecar at onStreamerFinished — no more GPU readback path via ViewportWindow::snapshotModel (removed). Same code path now produces sidecars for both live loads and the .rdbview offline export. Sidecar use is opt-in per direction via SceneLoader::setShouldReadSidecar and setShouldWriteSidecar; both default off so embedders that don't want caching get a pure-streaming loader. ifcviewer-full and ifcviewer-minimal opt in. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -161,12 +161,6 @@ public:
|
||||
|
||||
void resetScene();
|
||||
|
||||
// Snapshot the finalised model into a SidecarData struct for caching.
|
||||
// Vertices + indices are read back from the GPU; meshes/instances come
|
||||
// from the CPU-side vectors. Leaves `elements` and `string_table` empty
|
||||
// for the caller to fill in.
|
||||
bool snapshotModel(uint32_t model_id, SidecarData& out) const;
|
||||
|
||||
// Restore a finalised model from a cached SidecarData struct. Replaces
|
||||
// any existing state for model_id and marks it drawable.
|
||||
void applyCachedModel(uint32_t model_id, SidecarData data);
|
||||
|
||||
Reference in New Issue
Block a user