[ODE] Re: Rotation troubles

Ken M wgold at flyingplastic.com
Thu Feb 28 23:51:01 2002


Please disregard my previous e-mail.

I'm finding some subtle bugs in my matrix44->quaternion conversions which
I'm relying heavily on.  If these aren't solid, the problem could be arising
due to those.

Thanks for the info!

Ken

----- Original Message -----
From: <nlin@nlin.net>
To: <ode@q12.org>
Sent: Friday, March 01, 2002 4:38 AM
Subject: [ODE] Re: Rotation troubles


> > Only if I
> > send in the matrix as described in the above setTransform() call (which
> > swaps row/col), and then use the matrix returned from dBodyGetXXX raw do
> > I get expected and desired results.
>
> As I understand it, this is incorrect. dBodyGetXXX returns a row-major
> matrix, i.e. the first four elements are the first row of the 3x4 (row x
col)
> orientation matrix, where each row is zero-padded with a fourth
zero-element.
> OpenGL expects a column-major matrix, where the first four elements in
memory
> are the first column of the orientation.
>
> You can think of a matrix as a coordinate system, where, when you write
the
> matrix on paper, the first column represents the local x axis, the second
> column the y axis, and the third column the z axis. To debug such matrix
> transformations, you always need to ask yourself, "which elements in
memory
> represent my x axis?" Is it elements 0,1,2 (column-major, OpenGL), or is
> it elements 0,4,8 (row-major, ODE)?
>
> Post a simple compilable example code with expected and actual results and
> I can comment more.
>
> -Norman
> _______________________________________________
> ODE mailing list
> ODE@q12.org
> http://q12.org/mailman/listinfo/ode