-
Notifications
You must be signed in to change notification settings - Fork 68
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
Added std::optional MassMatrix()
functions for Box, Cylinder & Sphere
#538
Added std::optional MassMatrix()
functions for Box, Cylinder & Sphere
#538
Conversation
Signed-off-by: Jasmeet Singh <[email protected]>
… bindings Signed-off-by: Jasmeet Singh <[email protected]>
Signed-off-by: Jasmeet Singh <[email protected]>
…phere Signed-off-by: Jasmeet Singh <[email protected]>
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.
can you add the same test in Python ?
…linder Signed-off-by: Jasmeet Singh <[email protected]>
Codecov Report
@@ Coverage Diff @@
## gz-math7 #538 +/- ##
============================================
- Coverage 99.74% 99.70% -0.05%
============================================
Files 77 77
Lines 7032 7049 +17
============================================
+ Hits 7014 7028 +14
- Misses 18 21 +3
|
Signed-off-by: Jasmeet Singh <[email protected]>
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.
LGTM
🎉 New feature
Summary
The
Capsule.hh
andEllipsoid.hh
haveMassMatrix()
functions that take no parameters and return astd::optional
whileBox.hh
,Cylinder.hh
andSphere.hh
haveMassMatrix()
functions that have abool
return type and takegz::math::MassMatrix3d
object as a parameter.This PR corrects this non-uniformity of MassMatrix functions across different shapes by overloading the
MassMatrix()
function in theBox
,Cylinder
andSphere
headers to createstd::optional MassMatrix()
functions with a signature similar to the ones inCapsule
orEllpisoid
headers.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.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.