Hello Guest

# Quaternions?

• 20 Replies
• 13596 Views

#### spasi

• 2221
##### Quaternions?
« Reply #15 on: June 17, 2004, 19:35:07 »
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

• 1933
##### Quaternions?
« Reply #16 on: June 17, 2004, 21:30:00 »
I've committed it into CVS now.

Cas

#### fbi

• 56
##### Quaternions?
« Reply #17 on: June 18, 2004, 08:08:43 »
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:

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

• 56
##### Quaternions?
« Reply #18 on: June 18, 2004, 10:05:56 »
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

• 2221
##### Quaternions?
« Reply #19 on: June 18, 2004, 14:46:07 »
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

• 56
##### Quaternions?
« Reply #20 on: June 18, 2004, 15:17:52 »
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)

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: