ifcviewer-full: volume tool with HUD + per-object labels

Mirrors the Area tool's display: HUD shows total volume + object count,
each selected object gets a label at its world-AABB centroid showing
its individual volume.  Gated behind ToolMode::Volume (Ctrl+Shift+V) so
it stays out of the way until invoked.

Volume is a passive tool — selection works as in None (multi-select,
modifier toggle, box-select all keep working).  Area / Length still
intercept clicks through surfacePickedInTool.

Adds volumesPerObject() reusing the same mesh-cached readback path as
volumeOfObjects, so the per-object split costs no extra GL readbacks.
computeObjectAabb is promoted to public for the centroid lookup.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Dion Moult
2026-05-10 08:45:08 +10:00
parent bba2f30816
commit 0a297babea
6 changed files with 124 additions and 16 deletions
+4
View File
@@ -93,6 +93,10 @@ private:
bool confirmDiscardIfDirty();
void updateWindowTitle();
void populateProperties(uint32_t object_id);
// Push the volume HUD + per-object volume labels for the current
// selection. No-op when a measurement tool is active — that tool
// owns the overlay state until it's exited.
void updateVolumeReadout();
void appendElementToTree(uint32_t model_id,
uint32_t object_id,
int ifc_id,