Recently i've been facing an issue where my code knows about
a CollisionObject but needs to gain access to the associated CollisionWorld,
and I haven't been able to find any other way than adding a CollisionWorld
pointer on the CollisionObject itself (set/unset within add/remove object on the world)
Is there any other way of doing it that I missed ?
Thanks !
Francois
Link between CollisionObject and CollisionWorld
-
- Posts: 66
- Joined: Tue Mar 02, 2010 6:13 am
-
- Site Admin
- Posts: 4221
- Joined: Sun Jun 26, 2005 6:43 pm
- Location: California, USA
Re: Link between CollisionObject and CollisionWorld
There is no such link.
We avoid circular dependencies in the Bullet code base, and the world already knows about collision objects, so we cannot add a dependency from object to world.
If you need this information, you can add it in your user object (use object->setUserPointer/getUserPointer).
Thanks,
Erwin
We avoid circular dependencies in the Bullet code base, and the world already knows about collision objects, so we cannot add a dependency from object to world.
If you need this information, you can add it in your user object (use object->setUserPointer/getUserPointer).
Thanks,
Erwin
-
- Posts: 66
- Joined: Tue Mar 02, 2010 6:13 am
Re: Link between CollisionObject and CollisionWorld
yes i thought so...
problem is we're already using the userInfoPtr for other purposes ...
guess i will keep that pointer on our local code
Thanks for the info !
problem is we're already using the userInfoPtr for other purposes ...
guess i will keep that pointer on our local code
Thanks for the info !