-
-
Notifications
You must be signed in to change notification settings - Fork 21.1k
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
Clean convex hull decomposition code #50404
Clean convex hull decomposition code #50404
Conversation
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.
Overall having lines of code deleted while doing the same thing is good.
May want someone else to review the details, but it looks good.
The code code never handled quads previously. Trying to think of why it was more complicated.
In general it looks great. The only suggestion I would make is, that now we are returning the raw vertices, (which in most cases is what we want), but for debugging sometimes you will want to draw these as triangles, and we have lost the connectivity information. So I would include an optional parameter to return a triangle index list for each hull. Or we could simply return a |
c18d892
to
e2dc89d
Compare
@lawnjelly I've added an extra parameter to optionally get face information in an efficient way. It's not linked to any script API, but least it's ready in case someone wants to use it for debug purpose. |
conflicts must be fixed |
e2dc89d
to
72a36b5
Compare
Remove unnecessary conversion between triangle data and vertex data whenever possible.
72a36b5
to
2ca94e5
Compare
Following-up from #50262 (comment) (CC @lawnjelly)
Remove unnecessary conversion between triangle data and vertex data whenever possible.
After testing performance, it doesn't seem to make much difference because the time spent in preparing and finalizing data is negligible compared to the process in VHACD, but the code generally seems cleaner this way.