mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-10 06:00:51 +00:00
ifcviewer: move section-plane mutators into ViewportCore (#84-y)
addSectionPlaneAtSurface (camera-facing auto-flip + kMaxSectionPlanes cap check), removeSectionPlane, and clearSectionPlanes all move to ViewportCore. ViewportWindow keeps tiny forwarders so the section tool's input handlers (still VW) call through without seeing the move. Each method now calls host_->requestFrame() in place of the isExposed() + requestUpdate() gate, which means the section tool path becomes the next piece that could exercise the WebViewportHost: a click-to-add over WebGPU will work as soon as the host is wired, without further core-side changes.
This commit is contained in:
@@ -355,6 +355,23 @@ public:
|
||||
void finalizeScreenshotCapture(WGPUBuffer capture_buffer,
|
||||
std::uint32_t padded_bpr);
|
||||
|
||||
// ---- Section planes (#84-y) -------------------------------------------
|
||||
//
|
||||
// Append a section plane at the supplied surface hit, with a normal
|
||||
// auto-flipped toward the camera so the first click reveals the
|
||||
// surface the user just clicked. `visual_radius` controls the
|
||||
// overlay gizmo size; <= 0 falls back to 1 m. Returns false when
|
||||
// the kMaxSectionPlanes cap is already reached.
|
||||
bool addSectionPlaneAtSurface(const Eigen::Vector3f& point,
|
||||
const Eigen::Vector3f& normal,
|
||||
float visual_radius);
|
||||
|
||||
// Remove a single section plane by index (no-op when out of range).
|
||||
void removeSectionPlane(int index);
|
||||
|
||||
// Drop every section plane. No-op when none are active.
|
||||
void clearSectionPlanes();
|
||||
|
||||
// ---- Render loop (#84-x) ----------------------------------------------
|
||||
//
|
||||
// Encode one frame: acquire the swapchain texture, run cull (parallel
|
||||
|
||||
Reference in New Issue
Block a user