Re: [AD] matrix_to_quat and get_align_matrix

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


To make this last point clear, here another testcase (using the same
print functions from above):

int
main (void)
{
    MATRIX_f m;
    allegro_init ();

    /* Rotate 90 degree to the right around the y axis. */
    get_rotation_matrix_f (&m, 0, -64, 0);
    print_matrix (&m);

    /* Get a matrix with the front vector looking along the positive x
     * axis, and the up vector along the positive y axis. */
    get_align_matrix_f (&m, 1, 0, 0, 0, 1, 0);
    print_matrix (&m);
}

As you can see, both matrixes are the same, just one value is negated.
This means, the latter matrix isn't a rotation matrix anymore (I
think). At least, nothing works with it.

Instead of swapping the order in the cross_product calls, it can also
be solved by flipping the resulting "front vector". When thinking
about it, I don't even know what a "front vector" is supposed to be..
maybe I just misunderstand the function.




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/