From: Erik Brisson (ebrisson++at++tonka.bu.edu)
Date: 11/08/2001 13:01:43
On Thu, Nov 08, 2001 at 08:52:44PM +0000, Thomas Proell wrote:
> I seem to have a problem with the performer mathematics. The Performer
> Matrix Operations are not compatible with mine ;-)
...
> matrix.preTrans(2, 3, 4, matrix)
> for(i=0; i<3; i++)
> {
> matrix.getRow(i, &x, &y, &z, &m);
> printf("%d %d %d %d \n", x, y, z, m);
> }
>
> This gives me the result:
>
> a b c d
> e f g h
> i j k l
> 2 3 4 1
>
> What's wrong here? This isn't correct, is it? I have no idea what's
> going on here :-(
>
This is correct - the translation component of the transform
is represented in Performer by M[0][0], M[0][1], M[0][2] in the
pfMatrix.
If I am making the correct assumptions about you're existing system,
to make it correspond to Performer you would have to transpose all matrices
and vectors, and reverse the order of composition, e.g.,
M2 * M1 * v (in your system)
Transpose(v) * Transpose(M1) * Transpose(M2) (in Performer)
Erik Brisson
ebrisson++at++bu.edu
Scientific Computing and Visualization Group
Boston University
This archive was generated by hypermail 2b29 : Thu Nov 08 2001 - 13:00:40 PST