[ODE] dCloseODE() patch

Erwin de Vries erwin at vo.com
Wed Aug 7 01:47:02 2002


The better solution would be to change the API like this:

int dCreateGeomClass(const dGeomClass *c, int* cn);

For example: dCreateSphere would do it like this:
dCreateGeomClass (&c, &dSphereClass);

Then also do this in the dxGeomClass struct:
int* num;  // class number

And fix the few places where this member is used. You can then simply set it
to -1 in the dCloseODE() function.

Erwin

----- Original Message -----
From: "Russ Smith" <russ@q12.org>
To: "David McClurg" <dmcclurg@pandemicstudios.com.au>
Cc: <ode@q12.org>
Sent: Wednesday, August 07, 2002 3:39 AM
Subject: Re: [ODE] dCloseODE() patch


>
> > I'm on a console and I want to get back to a pristine state between
> > levels.  Since I have multiple ODE sessions I ran into a bug where the
> > geom class vars weren't getting reset properly.  Here is the patch...
>
> seems like a good idea. i've commited it. but the part that relies on
> two variables defined in the contrib code has been commented out, with
> an explanatory comment.
>
> russ.
>
> --
> Russell Smith
> http://www.q12.org
> _______________________________________________
> ODE mailing list
> ODE@q12.org
> http://q12.org/mailman/listinfo/ode
>
>