[ODE] dBodySetData

Mohamed Matar Mohamed.Matar at gmx.de
Mon Jun 20 20:06:46 MST 2005


Hi,
I am saving my Body data as integer number like this

dBodySetData (obj[Number].body,(void*) (Number));


I am trying to get the number back using dBodyGetData but it always give me
memory error.
I have tried several formats and failed. It is not a piece of cake for me :)
:)

Help Please

-----Original Message-----
From: Chunky Kibbles [mailto:chunky at icculus.org] 
Sent: Monday, June 13, 2005 1:48 AM
To: Mohamed Matar
Cc: ode at q12.org
Subject: Re: [ODE] dBodySetData

On Sun, Jun 12, 2005 at 11:39:25PM -0500, Mohamed Matar wrote:
> Hi everyone,
> What is this function for dBodySetData. Do I need to call it after I 
> set Position, rotation, velocities and forces ?. What is the parameter
passed.
> Please give examples. 

It's just a pointer to something. You can do whatever you want with it.
For example, you could ignore it.

Alternatively, for an example, it might be the name of a body;

const char *name = "ABody";
...
dBodySetData(body, (void *)name);
..
printf("Body Name: %s\n", (const char *)dBodyGetData(body));


Gary (-;

--
No virus found in this incoming message.
Checked by AVG Anti-Virus.
Version: 7.0.323 / Virus Database: 267.6.9 - Release Date: 6/11/2005
 



More information about the ODE mailing list