Share

Open Asset Import Library

Subscribe

Quaternion

You are viewing a single message from this topic. View all messages.

  1. 2009-10-31 21:51:59 UTC

    Hi,

    This is Jesse (co-author of the CML, the library godog23 referred to). I've looked at the code, and it does appear to me that the quaternion-to-matrix and matrix-to-quaternion functions are the transposes of what they should be. From the following code in your Translation() function:

    out.a4 = v.x; out.b4 = v.y; out.c4 = v.z;

    I deduce that you're using column-vector notational convention. However, both of the aforementioned quaternion conversion functions appear to be set up for row vectors, hence the inconsistency.

    As you note, the fact that both of the functions use the 'opposite' convention means that conversions two and from a quaternion or matrix will appear to be correct. However, users attempting to interoperate with other APIs may have to transpose matrices, negate w terms, or apply other workarounds in order to get the desired results.

    Assuming I'm right about this (and I'm 99% sure that I am), I'd definitely suggest fixing it if possible. Just my $.02 :)

    Jesse

< Previous | 1 | Next >

Add a Reply

This forum does not allow anonymous participation.

Log in to add a reply. Not registered? Create an account to participate and receive email updates when replies are posted to this topic.