[ODE] new trimesh vs trimesh code
Jon Watte (ODE)
hplus-ode at mindcontrol.org
Fri Sep 14 12:57:10 MST 2007
Oleh Derevenko wrote:
> Well, I'd predef doing this way rather than examining the neighbours. First
> of all, examining all the neighbours may spoil all the timing benefits from
> the hashing. Another thing that curently, contact points are groupped by
>
I don't think so -- doing the n-squared linear scan is a lot slower when
n gets big. When n is 10, though, you're probably better off putting
them all in a linear array and doing brute force, as it'll cache well.
However, the timing difference will likely not matter for such small a
contact set.
> rounding the position coordinates to 1e-4 precision - that makes neighbour
> buckets very small (a cube with edge of 1e-4). However including several
> close contacts usually makes final dynamics calculation equation system
> worse, as far as I understand.
>
Yes, you typically want to merge with 1e-2 precision if you're using meters.
Merging contacts with differing normals is necessary to get smooth
results from a ball rolling on a trimesh, because the normal of a sphere
intersecting with a triangle edge goes away from the edge toward the
sphere, not orthogonal to the triangle surface.
So, if you don't like it, the code's all yours :-)
More information about the ODE
mailing list