Something like setName for btRigidBody?

suitx
Posts: 4
Joined: Wed Jan 28, 2009 10:00 am

Something like setName for btRigidBody?

Post by suitx »

Hi! In my project I'm using the colladaConverter for scene loading.
While the converter reads out object names this info is lost when adding btRigidBody objects to the dtWorldDynamics.
I strongly need this kind of information in my initialisation phase of the program. I want to assign special handling to some of the rigid bodies that where laoded with the colladaConverter.
But how can I find the objects I want to find when their names are lost. Is there a chance to add some userdata to a btRigidBody?
The colladaConverter should pack the "name" information with the btRigidBody.

One way is to rewrite the whole colladaConverter and do the handling there. But I would prefer to parse my scene once after loading and check for object names I'm searching for.

So while there is nothing like "setAnnotation" or a "setName" or "addUserdata" for btRigidBody objects, has anyone a nice solution to do so?

Thanks, Ingo
B_old
Posts: 79
Joined: Tue Sep 26, 2006 1:10 pm

Re: Something like setName for btRigidBody?

Post by B_old »

setUserPointer() ?
suitx
Posts: 4
Joined: Wed Jan 28, 2009 10:00 am

Re: Something like setName for btRigidBody?

Post by suitx »

Damn! Thanks! I missed that one.
By using setUserPointer() it's easy to fix my problem.

regards, Ingo