Skip to content

XEOK-54 Expose SceneModelEntity's area and volume#1577

Draft
MichalDybizbanskiCreoox wants to merge 2 commits intomasterfrom
XEOK-54-59-area-volume
Draft

XEOK-54 Expose SceneModelEntity's area and volume#1577
MichalDybizbanskiCreoox wants to merge 2 commits intomasterfrom
XEOK-54-59-area-volume

Conversation

@MichalDybizbanskiCreoox
Copy link
Collaborator

This PR introduces SceneModelEntity::area and ::volume getters.
The metrics are computed during load time, and don't rely on run-time geometry information, thus assuming SceneModelEntity geometries don't change.
IMPORTANT: The metrics have been implemented for VBOBatchingTrianglesLayer and VBOInstancingTrianglesLayer, but not for DTXTrianglesLayer.

Another PR has been merged to the master branch, which uses a different approach, but provides the same metrics, at
#1574
so this one becomes a Draft PR for the time being.

<meta name="viewport" content="width=device-width, initial-scale=1">
<title>xeokit Example</title>
<link href="../css/pageStyle.css" rel="stylesheet"/>
<script src="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.13.0/js/all.min.js"></script>

Check warning

Code scanning / CodeQL

Inclusion of functionality from an untrusted source

Script loaded from content delivery network with no integrity check.
@tmarti
Copy link
Contributor

tmarti commented May 23, 2025

Shouldn't volume calculations be only available for entities made exclusively of watertight meshes?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants