[ODE] Trimesh Temporal Coherence Patches

Adam D. Moss adam at gimp.org
Sun Dec 7 15:47:48 MST 2003


Aras Pranckevicius wrote:
 > There are several issues with it:
 > [...]if there are geoms created/destroyed dynamically - then
 > even destroyed ones are still in a list[...] upon every
 > collision function call, it does a linear search over previously
 > mentioned ever-collided geom list[...]

Okay, thanks for that, that's all scary enough to warrant
the option of turning off the temporal coherence optimizations.

In fact, from a read of the collision_trimesh_box.cpp code
it looks as if geoms are entered by pointer into the TCCache,
which would cause not only the little incremetal memory wastage
you mention but also some really unpredictable behaviour and/or
crashes if those geoms are freed or re-used later.

So, how would people feel if I disable temporal coherence by
default?  Unless I'm mis-reading the code (i.e. not finding the
code that lets, say, a box remember all of the mesh TCCaches it's
in so it can notify them when it's destroyed, or a refcount), I
personally feel pretty uneasy about allowing TC as it stands to
be enabled through the public API at *all*.

Regards,
--Adam
-- 
Adam D. Moss   . ,,^^   adam at gimp.org   http://www.foxbox.org/   co:3
Consume Less, Live More


More information about the ODE mailing list