Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Program Announcements / FREE DBPro Euler/Quaternion/Matrix converter, and global/local rotation

Author
Message
Diggsey
18
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 3rd Aug 2007 19:32 Edited at: 3rd Aug 2007 19:34
I made these functions using information I found from here

With these functions, you can convert:
Euler -> Quaternion
Quaternion -> Euler
Euler -> Matrix
Matrix -> Euler

You can also multiply:
Matrices
Quaternions
(Either can be used to do both local and global rotation)

The code:


Function list:
EulerToMatrix(Rotation as Euler) - Converts Euler angles to Matrices
EulerToQuat(Rotation as Euler) - Converts Euler angles to Quaternions
MatrixToEuler(Rotation as Matrix3x3) - Converts Matrices to Euler angles
QuatToEuler(Rotation as Matrix3x3) - Converts Quaternions to Euler angles
MatrixMult(Angle as Matrix3x3, Rotation as Matrix3x3) - Adds two rotations. Use Angle as the current rotation, and Rotation as the rotation to apply to it, to rotate around a global axis. Switch them to do local rotation.
QuatMult(Angle as Quaternion, Rotation as Quaternion) - Same as above, but for Quaternions.

PowerSoft
19
Years of Service
User Offline
Joined: 10th Oct 2004
Location: United Kingdom
Posted: 3rd Aug 2007 19:50
Awesome-ness

The Innuendo's, 4 Piece Indie Rock Band
http://theinnuendos.tk:::http://myspace.com/theinnuendosrock
Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 4th Aug 2007 12:03
Very nice diggsey. Hoping to see more of the "Awesome-ness" from you, keep up the good work.


Cheers,

-naota

Login to post a reply

Server time is: 2024-05-01 18:46:15
Your offset time is: 2024-05-01 18:46:15