-
Notifications
You must be signed in to change notification settings - Fork 95
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
Add mesh simplification attribute to <mesh> #1380
Conversation
Signed-off-by: Ian Chen <[email protected]>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## sdf14 #1380 +/- ##
==========================================
- Coverage 92.42% 92.42% -0.01%
==========================================
Files 134 134
Lines 17751 17771 +20
==========================================
+ Hits 16406 16424 +18
- Misses 1345 1347 +2 ☔ View full report in Codecov by Sentry. |
src/Mesh.cc
Outdated
@@ -30,6 +30,9 @@ using namespace sdf; | |||
// Private data class | |||
class sdf::Mesh::Implementation | |||
{ | |||
/// \brief Mesh simplification method | |||
public: std::string simplification; |
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.
maybe use a enum here?
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.
added enum in 64d7c97
sdf/1.11/mesh_shape.sdf
Outdated
|
||
<attribute name="simplification" type="string" default="" required="0"> | ||
<description> | ||
Set whether to simplify the mesh using one of the specified methods. Values include: "convex_hull", "convex_decomposition". Default value is an empty string which means no mesh simplification. |
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.
Could it make sense to add a sentence, a link or a reference to what these methods mean?
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.
expanded this to include description for the values. 64d7c97
@@ -1,5 +1,12 @@ | |||
<element name="mesh" required="0"> | |||
<description>Mesh shape</description> | |||
|
|||
<attribute name="simplification" type="string" default="" required="0"> |
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.
I'm trying to decide if simplification
is the right name for this attribute.
Alternatives (which might not be better):
//mesh/@transformation
//mesh/@convexity
with candidate values:
use_convex_hull
use_convex_decomposition
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.
I think transformation
is generic and would be another good candidate. So we don't limit this to just creating convex meshes
Signed-off-by: Ian Chen <[email protected]>
replaced by #1382 -> |
🎉 New feature
Implemented proposal in #68
Summary
Adds a new optional attribute called
simplification
to the<mesh>
sdf element. This allows users specify a method for simplifying the mesh, e.g.Also updated the Mesh DOM class to include this new attribute.
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.