[ODE] Trimesh Temporal Coherence Patches

Vadim Macagon vadim_mcagon at hotmail.com
Mon Dec 8 09:39:24 MST 2003


> Vadim Macagon wrote:
> > void dGeomTriMeshEnableTC(dGeomID g, int geomClass, int enable);
> > int dGeomTriMeshIsTCEnabled(dGeomID g, int geomClass);
> >
> > These functions can be used to enable/disable the use of temporal
coherence
> > during tri-mesh collision checks. Temporal coherence can be
enabled/disabled
> > per tri-mesh instance/geom class pair, currently it works for spheres
and
> > boxes.
>
> Committed, thanks!
>
> However, the existing TC implementation seems subtly broken to me,
> not simply from a minor efficiently sense but rather by keying a
> cache by a pointer, where pointers are prone to re-use (especially
> by objects of the same size/type) and this is hard to detect.
>
> For this reason I'll probably do one of the following soon:
> * turn TC off by default, users can use dGeomTriMeshEnableTC()
> * turn TC off *and* hide the dGeomTriMeshEnableTC() prototype.
>
> It'll probably be the latter until someone can either show
> where the cached data is re-validated as correct by the code that
> uses it, or can submit a fix.  My concern is that the subtle,
> intermittant and hard-to-reproduce wrongness that might occur due
> to this minor foible of the TC implementation could cause ODE's
> users a lot of pain to pinpoint.  I'd be happier knowing that I
> was wrong or that there was a fix in-hand.

Yep the 2 reasons Aras provided is why I wanted to switch TC off, I haven't
realised pointer reuse is yet another possible issue. Turning off TC by
default and commenting out dGeomTriMeshEnableTC() sounds ok to me, until
someone provides a better implementation.


Cheers,

Vadim.


More information about the ODE mailing list