A place to discuss everything related to Newton Dynamics.
Moderators: Sascha Willems, walaber
by predaeus » Mon Jan 26, 2009 10:40 am
Using OpenGL style row-major order matrices here I transpose matrices when passing between Newton2 and my application. Now I wonder how NewtonBodySetOmega works. If I specify NewtonBodySetOmega(foo, {1.0, 0.0, 0.0}) I get counter-clockwise rotation around the x-axis.
I thought for a right-handed coordinate system it would rotate clockwise. Is Newton2 using a left-handed system?
Please can someone clarify this because if Newton2 is right-handed and this should indeed rotate clockwise then I can look for bugs in the drawing or matrix routines here.
-
predaeus
-
- Posts: 19
- Joined: Wed Jan 21, 2009 10:49 am
by Julio Jerez » Mon Jan 26, 2009 10:52 am
you do not need to transpose anything, newton use teh same system than OpenGl uses
-
Julio Jerez
- Moderator
-
- Posts: 12249
- Joined: Sun Sep 14, 2003 2:18 pm
- Location: Los Angeles
-
by predaeus » Mon Jan 26, 2009 10:58 am
oh, ok so the 1.5 documentation
The matrix should be arranged in row-major order (this is the way directX stores matrices). If you are using
OpenGL matrices (column-major) you will need to transpose you matrices into a local array, before passing
them to Newton.
is outdated.
Thanks for the info!
-
predaeus
-
- Posts: 19
- Joined: Wed Jan 21, 2009 10:49 am
by Julio Jerez » Mon Jan 26, 2009 2:01 pm
That comment is wrong.
The matrix shout not be transposed for eiethe D3d or OGL
-
Julio Jerez
- Moderator
-
- Posts: 12249
- Joined: Sun Sep 14, 2003 2:18 pm
- Location: Los Angeles
-
by Aphex » Sat Jan 31, 2009 10:15 am
Also, a positive rotation in a right-handed coordinate system (when looking from a positive axis back towards the origin) will be anti-clockwise.
-
Aphex
-
- Posts: 144
- Joined: Fri Jun 18, 2004 6:08 am
- Location: UK
-
Return to General Discussion
Who is online
Users browsing this forum: No registered users and 11 guests