Re: [Algorithms] Correct Way to transform direction vector
Brought to you by:
vexxed72
|
From: Neal T. <ne...@ps...> - 2000-10-31 11:09:23
|
From: Jason Zisk <zi...@n-...> > Hey everyone. I'm having a problem transforming a direction vector from one > coordinate space to another. I need to transform the direction of the ray > from world space to object space so I can do an intersection on the > triangles in a mesh. > [snip] > I looked back at the archives of this list and I noticed a discussion of > transforming normals. It seems that using the transpose of the inverted > transformation matrix is the right way to transform a normal. By doing this > I actually solved some problems (with scaling) but caused others with > rotation. What sort of problems with rotation? Naively, I would have thought that the transpose of the inverse of the 3x3 matrix would work, assuming you're not doing anything really exotic in your transform... Neal Tringham (Sick Puppies / Empire Interactive) ne...@ps... ne...@em... |