-
Notifications
You must be signed in to change notification settings - Fork 102
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 Ellipsoid #259
Add Ellipsoid #259
Conversation
…lasses for now. TODO: add tests for ellipsoids.
Ellipsoids support
I will merge it as there is no conflict with the existing work. |
@@ -381,6 +397,10 @@ MinkowskiDiff::GetSupportFunction makeGetSupportFunction1 (const ShapeBase* s1, | |||
inflation[1] = static_cast<const Sphere*>(s1)->radius; | |||
if (identity) return getSupportFuncTpl<Shape0, Sphere, true >; | |||
else return getSupportFuncTpl<Shape0, Sphere, false>; | |||
case GEOM_ELLIPSOID: | |||
// TODO: what should we put for inflation[1]? |
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.
It should be 0 since the support function returns a point on the shape. I think it is initialized to 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.
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.
Yes no problem.
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.
@@ -421,6 +441,10 @@ MinkowskiDiff::GetSupportFunction makeGetSupportFunction0 (const ShapeBase* s0, | |||
inflation[0] = static_cast<const Sphere*>(s0)->radius; | |||
return makeGetSupportFunction1<Sphere> (s1, identity, inflation, linear_log_convex_threshold); | |||
break; | |||
case GEOM_ELLIPSOID: | |||
// TODO: what should we put for inflation[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.
Same as above.
This PR done by @lmontaut introduces the class Ellipsoid, which can be further used for external applications.