Question regarding the dynamics component

2 views
Skip to first unread message

Peter C.

unread,
Jul 1, 2012, 8:30:39 PM7/1/12
to dtenti...@googlegroups.com
Hey, I'm looking at the dynamics component, and I'm a little bit confused on one aspect of the code. On the angular velocity, I notice there is are X, Y, Z, and W values. I can figure out what the X, Y, and Z values are, but what does the W value represent? My guess is gravity/ downward, however I'm not sure.

Thanks,
Peter

Martin Scheffler

unread,
Jul 1, 2012, 11:25:16 PM7/1/12
to dtenti...@googlegroups.com
Currently I am storing angular velocity as a quaternion, as
orientation in TransformComponent is also stored as a quaternion.
Over the network I am transfering the angular velocity as
yaw/pitch/roll to keep things DIS-like.
Do you think using yaw/pitch/roll internally would be better?

I am not an expert on the whole transformation issues, so I can really
use advice.
The whole networking system is still very new, I have not yet added a
way to do conversion between
local coordinates and earth centric or other coordinate systems

Cheers,
Martin

2012/7/2 Peter C. <th3f...@gmail.com>:

Peter C.

unread,
Jul 2, 2012, 6:03:07 PM7/2/12
to dtenti...@googlegroups.com
I really don't know which would be better in this situation. I'm only just now learning about quaternions, so i really can't give any good input on this. I do feel however it may be a good idea to give the option of using either quaternion or yaw/pitch/roll as a method of inputting the transform (I don't have enough experience to say which would be better behind the scenes). That should help in situations where one or the other is needed for a specific purpose. My intent with the question initially was to figure out what what the W meant so that I could try to implement a G-Force meter component for practice. As for methods of storing/handling transforms, I'm not experienced enough to tell you either way.

Riccardo Corsi

unread,
Jul 3, 2012, 4:18:52 AM7/3/12
to dtenti...@googlegroups.com
Hi Martin,

in general terms I think the quaternion is the way to go.
Yaw/Pitch/Roll are system specific (up axis, transformation order...) while quaternions are more flexible and general purpose,
and fit better with the transform that osg exposes.

My 2 cents.
Ricky


Martin Scheffler

unread,
Jul 3, 2012, 5:00:04 AM7/3/12
to dtenti...@googlegroups.com

Exactly, i really don't want to differentiate between body angles and world angles or whatever that was called

Peter C.

unread,
Jul 3, 2012, 10:08:39 AM7/3/12
to dtenti...@googlegroups.com
Yeah, looking at it that way, quats are probably the right way to store it internally.
Reply all
Reply to author
Forward
0 new messages