|
From: Markus R. <rol...@un...> - 2008-04-13 09:55:01
|
Hi, Markus Rollmann wrote: [...] > Concerning your latest change to the Collider class: I think carrying a > 'space' pointer in each Collider may work but is a quite heavy weight > solution. You further don't adapt the pointer if the geom is moved to > another space. > > I think it would be nice to query special properties of Spaces without > following three pointers (from dGEomId to Collider to Space)... > > The ODE library already provides a function to get the spaceId given a > geomId (dGeomGetSpace(dGeomId)). So given dGeomId obj1 and obj2 in Space > ::HandleCollide it is easy to get and compare both spaceid. > >>From this point on we could either use the cached space pointer that you > added or manage a simple static set of dSpaceIds in the Space class. > This set contains spaceIds of spaces that have the > 'mIsDisableInnerCollision' set. Querying this set is a fast lookup > without any pointers involved. I commited a change to remove the savedspace pointer from the Collider class again and use a set of dSpaceIds to do the test instead. It seems to work. Please test. cheers, Markus |