Avoid duplicated vertices in the SDF octree.

Before: nnode: 42777, nvert: 342216
After: nnode: 42777, nvert: 77588
PiperOrigin-RevId: 792115571
Change-Id: I17913ed3d22f22a0370dc4cbd2b833a0f5983cda
This commit is contained in:
Alessio Quaglino
2025-08-07 05:26:04 -07:00
committed by Copybara-Service
parent 840108cf7c
commit 781242ae95
3 changed files with 52 additions and 15 deletions
-1
View File
@@ -780,7 +780,6 @@ void mjCMesh::TryCompile(const mjVFS* vfs) {
if (!plugin.active) {
tmd::TriangleMeshDistance sdf(vert_.data(), nvert(), face_.data(), nface());
// TODO: do not evaluate the SDF multiple times at the same vertex
// TODO: the value at hanging vertices should be computed from the parent
for (int i = 0; i < octree_.NumNodes(); ++i) {
for (int j = 0; j < 8; j++) {