[ODE] User Data Question

Matthews, Steve USA swmatthe at nps.navy.mil
Mon Sep 8 17:21:02 2003


> [...] but if the dBodySetData() function does 
> what I think it does, it may save me a lot of 
> time.
> 
> Here's my question: can the data set using the 
> aforementioned function be used for anything? I 
> suppose I'm wondering whether or not the data is 
> used by ODE, or whether it's simply a storage 
> space for a piece of data to be stored in the 
> specified body.
> 
> Best Regards,
> Julian Spillane


   Yes, you can use that (void pointer) for whatever you like.  I believe it's been mentioned on the list before that it is not used for anything internal to ODE--that it is there for exactly what you are looking for; somebody please add to this, because I don't want to say that and then be wrong and not know.  But I have not found it a problem to use it for whatever I need.
   It is particularly useful for passing information into the collision callback functions, but really, you can use it for anything.  Yes, very handy.  

  --Bootshine