when would I use a collision solid consisting of the intersection of two spheres and two half-spaces?
In Panda3D, I've been learning a bit about the built-in physics engine and its collision detection features.
I'm trying to understand the DSSolid collision object, which is mentioned in a table on the C开发者_开发知识库ollision Solids manual page without explanation. It is tersely described in the API reference as "A collision volume or object made up of the intersection of two spheres (potentially a lens) and two half-spaces (planes)."
I basically understand that geometric description, but what is the purpose of such a shape??
Interestingly, this DSSolid is the one collision solid, other than a sphere, that can be either a "from" or an "into" solid. This suggests to me that the shape is considered to be either more commonly needed than other shapes (such as a plane or a tube or an inverse sphere), or is cheaper to test. Neither of those reasons rings true to me... a DS would be more expensive than an inverse sphere to test for collisions against, and it seems to me, less useful. So I'm wondering, what is the use case for a DSSolid?
I'm curious too how the planes are typically arranged in relation to the two spheres... but that would probably become clear given the use case for this solid.
(And what does DS stand for? Double sphere?)
This question has been answered on the Panda3D forums :
Actually, I think this solid doesn't have much general use, and should probably be removed from the codebase. It was implemented once as part of an experiment by one of the Disney engineers whose initials happened to be D.S., and it was never developed further. The student who wrote up the collision page in the manual came across this solid and wrote what he knew about it, which wasn't much.
精彩评论