Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds new function in MeshManager for performing convex decomposition #583

Closed
wants to merge 3 commits into from

Conversation

iche033
Copy link
Contributor

@iche033 iche033 commented Mar 13, 2024

🎉 New feature

Summary

Adds function for doing convex decomposition using the header only library V-HACD.

The new function take a submesh and returns a vector of decomposed submeshes. Currently a couple of parameters are exposed:

  • _maxConvexHulls: max number of convex hulls to produce
    • value: 16 (default in V-HACD: 64)
  • _voxelResolution: resolution of voxels to use when decomposing the submesh
    • value: 200000 (default in V-HACD: 400000)

These default values for these parameters are lower than the default values provided in V-HACD for a faster convex decomposition process as the process with original values could take quite some time for complex meshes.

Checklist

  • Signed all commits for DCO
  • Added tests
  • Added example and/or tutorial
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • Consider updating Python bindings (if the library has them)
  • codecheck passed (See contributing)
  • All tests passed (See test coverage)
  • While waiting for a review on your PR, please help review another open pull request to support the maintainers

Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining Signed-off-by messages.

iche033 added 2 commits March 13, 2024 02:32
Signed-off-by: Ian Chen <[email protected]>
Signed-off-by: Ian Chen <[email protected]>
std::size_t _maxConvexHulls,
std::size_t _voxelResolution)
{
std::vector<SubMesh> decomposed;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

include <vector>

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

addressed in #585 that targets main

points[idx + 2] = _subMesh->Vertex(i).Z();
}

uint32_t *indices = new uint32_t[indexCount];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

include <cstdint>

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

addressed in #585 that targets main

@iche033
Copy link
Contributor Author

iche033 commented Mar 14, 2024

replaced by #585 - > main

@iche033 iche033 closed this Mar 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🌱 garden Ignition Garden 🎵 harmonic Gazebo Harmonic
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants