[ODE] Quick ODE question from an ODE newbie.
Bram Stolk
b.stolk at gmail.com
Mon Sep 3 07:58:48 MST 2007
ID's are just ptrs:
typedef struct dxWorld *dWorldID;
typedef struct dxSpace *dSpaceID;
typedef struct dxBody *dBodyID;
typedef struct dxGeom *dGeomID;
typedef struct dxJoint *dJointID;
typedef struct dxJointGroup *dJointGroup
So a valid ID will never be 0.
But beware with your smart ptr solution:
The order of destruction is important.
If you do it in the wrong order, the program will crash.
Read more on this at:
http://sourceforge.net/tracker/index.php?func=detail&aid=1566350&group_id=24884&atid=382799
Bram
On 9/3/07, Jeremy Roberts <jroberts at digipen.edu> wrote:
>
>
> Hello fellow ODE users,
> I have a quick ODE question from an ODE newbie. I could sort for hours
> through the code possibly and find the answers to these but in truth there
> may be things I missed or overlooked due to internal workings and this is
> critical.
> Question) In theory I am thinking in my engine design of using safe
> pointers for ODE bodies/geoms/joints etc. except rather than delete them I
> would destroy the related type.
> I need to know if there is a value for ids (bodies/geoms/joints/worlds
> etc.) that will never be taken (likely 0 if there is one) such that the
> conditional for destruction will properly "safe destroy".
>
> Thank you,
> Jeremy (grill8)
> A.S. Real Time Interactive Simulation
> [Video Game Computer Science]
> DigiPen Institute of Technology
>
> - Make the world what it could be, not what it is.
>
> _______________________________________________
> ODE mailing list
> ODE at ode.org
> http://ode.org/mailman/listinfo/ode
>
--
Zapp: Captain's log, stardate...er..
Kif: Ohhh. April 13th.
Zapp: April 13th. Point 2.
More information about the ODE
mailing list