-
Notifications
You must be signed in to change notification settings - Fork 42
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
Conversation
Signed-off-by: Ian Chen <[email protected]>
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; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
include <vector>
There was a problem hiding this comment.
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]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
include <cstdint>
There was a problem hiding this comment.
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
replaced by #585 - > |
🎉 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_voxelResolution
: resolution of voxels to use when decomposing the submeshThese 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
codecheck
passed (See contributing)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.