mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-20 04:04:00 +00:00
BVH frustum culling, sidecar cache, per-model buffers, progressive upload
Phase 2 performance: BVH acceleration with median-split build, per-model trees, and EBO re-sorting for GPU cache coherence. Raw binary .ifcview sidecar stores full geometry + BVH for instant subsequent loads (skip tessellation entirely). Per-model GPU buffers (VAO/VBO/EBO per model) eliminate cross-model buffer copies on growth. Sidecar reads happen on a background thread. Bulk GPU uploads are progressive (48 MB/frame chunks) so the viewport stays interactive while multi-GB models stream in. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -31,6 +31,7 @@
|
||||
|
||||
#include <map>
|
||||
#include <deque>
|
||||
#include <thread>
|
||||
#include <unordered_map>
|
||||
|
||||
#include "ViewportWindow.h"
|
||||
@@ -72,6 +73,11 @@ private:
|
||||
void setupMenus();
|
||||
void populateProperties(uint32_t object_id);
|
||||
void startNextLoad();
|
||||
void applySidecarData(ModelId mid, SidecarData data);
|
||||
void joinSidecarThread();
|
||||
void populateTreeFromSidecar(ModelHandle& model,
|
||||
const std::vector<PackedElementInfo>& elements,
|
||||
const std::string& string_table);
|
||||
void connectStreamer(GeometryStreamer* streamer);
|
||||
|
||||
ViewportWindow* viewport_ = nullptr;
|
||||
@@ -91,6 +97,7 @@ private:
|
||||
uint32_t next_object_id_ = 1; // monotonically increasing across all models
|
||||
std::deque<ModelId> load_queue_;
|
||||
ModelId loading_model_id_ = 0;
|
||||
std::thread sidecar_read_thread_;
|
||||
|
||||
// Map object_id -> tree item and element info
|
||||
std::unordered_map<uint32_t, ElementInfo> element_map_;
|
||||
|
||||
Reference in New Issue
Block a user