-
Notifications
You must be signed in to change notification settings - Fork 285
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
Proposal: SphereShape #724
Comments
From an abstraction standpoint it would seem silly for |
I agree that this is an extremely useful special case to handle independently. If anything, the I guess another alternative would be a lot of boilerplate involving branching on an |
I think the main issue here is that we ultimately want to be able to change parameters of shapes (such as dimensionality) on the fly. For most collision detectors, we're implementing |
@mxgrey: Totally agree, I was only posting the alternative for completeness. Trying to shoehorn the two shapes together would require a lot of boilerplate and add performance losses in rather strange places (since the underlying data structure would need to change when moving from an ellipsoid to a sphere and vice versa). |
This might be silly (and was declined before), but I'd like to try one more time. 😓
We have used
EllipsoidShape
to represent sphere by setting the radii to be the same since a sphere is a special case of an ellipsoid. However, we could use the speciality of the sphere to take the advantage of cheaper collision checking algorithms for spheres from the collision detectors. We could still use ellipsoid to create sphere shape in the collision detectors when the radii are the same, but modifying the radii not to be the same would require to change the collision detector's shape to ellipsoid (and vice versa) once we have collision shape refresh feature. Still we could handle this using ellipsoid, but I imagine havingSphereShape
would be more straigtforward and clean in implementation.The text was updated successfully, but these errors were encountered: