> FYI. A chance the following inside_vector issue in play.
> "Leaving mesh inside_vector untouched on transforms."
That merge request changes the inside_vector test to use MInvTransPoint instead
of MInvTransRay followed by a Normalize, which makes sense to me.
In the version where I don't transform the mesh vertex data, I am doing
MInvTransPoint to tranform the test point, computing the minimum distance Vector
from the transformed test point to the original mesh data, then using
MInvTransDirection to transform that Vector using the mesh's Trans, then using
the length of the transformed vector as the distance.
The result obtained this way is a lot worse.
I wonder if there are cases where it would actually get a *wrong* answer, not
just loss of precision...such as the case where the object is scaled
non-uniformly. I think you can come up with an easy example where this is the
case where a "fat" ellipse that has a larger diameter in the x/y plane is scaled
such that it has a larger diameter in the x/z plane. Looking at the point at the
center of the ellipse, the minimum distance direction vector would switch from
<1, 0, 0> to <0, 1, 0> (for example).
Post a reply to this message