[ODE] Distance between two objects
Jon Watte
hplus-ode at mindcontrol.org
Mon Apr 19 13:10:07 MST 2004
> > or less difficulty. However, if you're using arbitrary trimeshes, the
> > problem is very hard, and you may have to suffer approximations.
> To be a little more precise: there's a simple, exact solution. Just
> loop over all pairs of triangles (where 1st triangle of the pair is from
> the 1st trimesh, and 2nd triangle is from the 2nd trimesh), and find the
And, without spending horribly long on it, you can turn o(N*M) into
o((N/2)*log(M)). Only test triangles on the "close half" of the smaller
mesh, and use a log(M) structure (like the AABB trees that OPCODE has)
to accelerate the queries for the larger mesh. Note small ordo, so constants
count ;-)
Curiously, turning this into log(N)*log(M) is significantly more
challenging!
Cheers,
/ h+
More information about the ODE
mailing list