[ODE] newbie question -- ode orientation matrices and quats
Daniel Monteiro Basso
dmbasso at inf.ufrgs.br
Wed Nov 19 23:11:50 MST 2003
Hi,
I made a library for scene management, with povray output. I'll release
it GPLd in the future (when the whole simulator I'm building is stable
enough).
The part that deals with the translation/rotation matrix is:
if (type!=dPlaneClass)
out << "matrix <"
<< rot[0] << "," << rot[8] << "," << rot[4] << ",\n"
<< rot[1] << "," << rot[9] << "," << rot[5] << ",\n"
<< rot[2] << "," << rot[10] << "," << rot[6] << ",\n"
<< pos[0] << "," << pos[2] << "," << pos[1] << ">\n";
As you can notice, povray uses columns instead of lines, and the 'up'
vector is Y, not Z.
You can see the current stage of the simulator (named 'phi') at:
http://www.inf.ufrgs.br/~dmbasso/phi
There is not much to see yet, but I welcome feedback.
Hope this helps... :)
Daniel
On Wed, 2003-11-19 at 22:24, Chris Calef wrote:
> A question from an ODE newbie --
>
> I just started using it, am absolutely ecstatic, but
> am having problems communicating with other
> applications. This question may be out of scope,
> because it may have more to do with 3ds max and povray
> than ode, but the fact that I can't make it work in
> either app makes me wonder if it is something strange
> about ODE.
>
> What I've been trying to do is save the positions and
> orientations of objects in my ODE simulation to frames
> that can be used for static animations, for game
> characters.
>
> What I did was every few frames, write out the matrix
> or quaternion (I tried both), and the position, of
> each object in my simulation. Then I used maxScript
> to read that in to 3ds max (using the quaternion
> version, because from the max docs it appears that you
> can't set the object's local orientation matrix
> directly). The positions worked fine, of course, but
> the orientations never worked, it looked like they
> were getting close but they never quite lined up with
> what they should have been.
>
> I then tried the same thing in povray, using the
> matrix from dBodyGetRotation (trying about every
> possible permutation of ways the matrix could be
> organized). Still no luck.
>
> I understand that this is a pretty vague question, but
> I'm just wondering if there is some core weird thing
> about how ODE handles orientations that could solve my
> problems. Thanks to everyone who's worked on ODE, it
> is BEAUTIFUL!!
>
> Chris Calef
>
>
> __________________________________
> Do you Yahoo!?
> Protect your identity with Yahoo! Mail AddressGuard
> http://antispam.yahoo.com/whatsnewfree
> _______________________________________________
> ODE mailing list
> ODE at q12.org
> http://q12.org/mailman/listinfo/ode
More information about the ODE
mailing list