[ODE] How I use the dBodyGetPosition?

Ed Jones ed.jones at oracle.com
Wed Jan 14 14:54:53 MST 2004


 From the docs;

"When getting, the returned values are pointers to internal data 
structures, so the vectors are valid until any changes are made to the 
rigid body system structure."

dBodyGetPosition return a pointer to a dReal, you can access the x, y 
and z components of the position as you would any C array.
Lots of the examples show this usage, for example in test_buggy.cpp;

    const dReal *a = dBodyGetPosition (body[i+1]);
    dJointSetHinge2Anchor (joint[i],a[0],a[1],a[2]);

i.e. Set the anchor point of joint[i] to the position of body[i+1].

The only "tutorials" for ODE are the examples.
;-)


Alexandre Ribeiro de Sá wrote:

> AHOY!
>  
> How I use the dBodyGetPosition???
>  
> I created the dReal variable, but I can get only one value...
> And, there any tutorial about ODE???
>  
>  
>  
> Thx
>
>------------------------------------------------------------------------
>
>_______________________________________________
>ODE mailing list
>ODE at q12.org
>http://q12.org/mailman/listinfo/ode
>  
>



More information about the ODE mailing list