[ODE] ODE Unstable Commit: Trimesh Preprocessing
Geoff Carlton
gcarlton at iinet.net.au
Thu Mar 31 12:34:55 MST 2005
This looks good - I've immedately got from unstable and merged it fine
with my code. Thanks, a nice improvement like this doesn't come along
every day!
However, I've noticed that it seems to do two unnecessarily
normalisations per edge check. To work out the concavity, it performs a
dot product on two normalised vectors. As this is only done to check
the sign, I believe the result would be the same even if the two vectors
weren't normalised.
Geoff
Colin Bonstead wrote:
>Ok, it took me about a half hour, but I finally did a commit to the ODE
>unstable branch. For anyone else trying to do this, make sure you're
>logged in via SSH, otherwise it won't let you commit.
>
>Anyway, what I committed is a patch I did last year to add trimesh
>preprocessing. I based it on the chapter "Fast Contact Reduction for
>Dynamics Simulation" in Game Programming Gems 4. Basically it's just
>marking all the interior and concave edges (and their vertices) as
>ignorable. It requires an extra byte of memory for each triangle if you
>use it. (If you don't call the preprocess function on your trimesh it
>should function the same way as before, and not allocate any extra
>memory.)
>
>To use it, just call the function dGeomTriMeshDataPreprocess on your
>trimesh. Once you've done that the data is cached and ready for use by
>the colliders. Currently, only the ccylinder-trimesh collider uses the
>data, since that's the only one I use. However, it should be fairly
>easy to add it to any of the other colliders, if someone wants to do
>that.
>
>If you want to cache the preprocessed data so you don't have to compute
>it every time you start your simulation, you can use the functions
>dGeomTriMeshDataGetBuffer and dGeomTriMeshDataSetBuffer.
>
>Colin Bonstead
>Cyan Worlds, Inc
>
>
>
>_______________________________________________
>ODE mailing list
>ODE at q12.org
>http://q12.org/mailman/listinfo/ode
>
>
>
>
>
More information about the ODE
mailing list