What is a DSSolid collision object for?

Return to Scripting Issues

What is a DSSolid collision object for?

Postby huttarl » Thu May 12, 2011 1:55 pm

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 Collision Solids manual page (http://www.panda3d.org/manual/index.php/Collision_Solids) without explanation. It is described in the API reference (http://www.panda3d.org/apiref.php?page=CollisionDSSolid) 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?)

(I posted this a week ago on StackOverflow but nobody seems to know. http://stackoverflow.com/questions/5899639/when-would-i-use-a-collision-solid-consisting-of-the-intersection-of-two-spheres)
huttarl
 
Posts: 4
Joined: Fri Jan 21, 2011 4:29 pm

Postby drwr » Thu May 12, 2011 4:01 pm

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.

David
drwr
 
Posts: 11425
Joined: Fri Feb 13, 2004 12:42 pm
Location: Glendale, CA

Postby wezu » Fri May 13, 2011 4:24 am

Is this the legendary ship-shaped-collision-solid?
I may be totally wrong, cause I'm a dancin' fool.

NameError: global name 'elf' is not defined
User avatar
wezu
 
Posts: 719
Joined: Tue May 19, 2009 1:03 pm

Postby drwr » Fri May 13, 2011 9:15 am

I don't know how legendary it is, but yes, that was the original intention. It was never used.

David
drwr
 
Posts: 11425
Joined: Fri Feb 13, 2004 12:42 pm
Location: Glendale, CA


Return to Scripting Issues

Who is online

Users browsing this forum: funnybear465 and 0 guests