Quaternions?

Started by fbi, June 16, 2004, 15:54:41

Previous topic - Next topic

spasi

Everything's nice, only a few functionality requests :roll: :

1) The SLERP you mentioned you'll implement.
2) Euler-to-Quaternion conversion would be welcome.
3) Methods to immediately transform (rotate) a vector by the quat and its inverse.
4) Quat inverse.
5) Matrix creation based on the quat rotations.
6) Matrix creation based on the quat rotations and a position vector.

princec

I've committed it into CVS now.

Cas :)

fbi

Ok guys...hopefully I will end up the task for today (SLERP was implemented yesterday night...so point 1) is always done Spasi)  :)
I will go on till this afternoon because today in my department there's absolutely nobody (possibly they are meditating for this evening Italian  footbal team match)  :wink:
Anyway some notes about your requests:

a) For the Point  3) I guess you mean the well known q*v*q^(-1) which transforms the vector v by means of q. Ain't it?!?
b) Point 5) is just quaternion-to-matrix conversion in my mind. Am I correct or do you mean something else?
c) If I was right for Point 5), Point 6) is just obtained by affecting the last column of the transformation matrix (the translation part of the 4x4 homogeneous matrix).

Can you give me some feedback on these?

fbi

Ok people,
I added all the stuff mentioned by Spasi and I went a bit further, because I implemented conversion methods to and from euler angles, matrix (4f and 3f) and axis/angle (represented as a Vector4f).
I guess we should do a bit of test....but the stuff is quite complete right now  :wink:
Take a look at it at http://ant1.di.uniba.it/lwjgl/Quaternion.java (I renamed of course the old version).[/url][/b]

spasi

You got everything right, great job!

OT: As for Euro 2K+4, everyone's ecstatic here in Greece too. We still can't believe we're so close to the next round! :shock:

fbi

Thank you...quaternions were the first subject I covered in a computer graphics article ever  (I was 20 and I was a C++_only coder at that time) :D

P.S.= For Euro2K+4 we're still waiting...tonight is the night (at least for us...don't know if some people from Sweden think so)  :wink: