quaternions

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
ttom
Posts: 43
Joined: Tue Aug 26, 2003 3:43 am
Location: Taiwan

quaternions

Post by ttom »

Hi anyone:
Does any idea for the quaternions.
:D
[dx/x]=HUNT3R
Posts: 271
Joined: Sat Aug 23, 2003 5:52 pm
Location: Hurricane Central, Florida

Post by [dx/x]=HUNT3R »

huh?
saigumi
Posts: 921
Joined: Fri Aug 22, 2003 11:31 am
Location: St. Louis, MO USA
Contact:

Post by saigumi »

Crud, how do I do this again?
ttom
Posts: 43
Joined: Tue Aug 26, 2003 3:43 am
Location: Taiwan

quaternions

Post by ttom »

Thanks saigumi for the great document.
Sorry for my question. I mean that the Niko to implement the quaternions ?

sorry for my english.
saigumi
Posts: 921
Joined: Fri Aug 22, 2003 11:31 am
Location: St. Louis, MO USA
Contact:

Post by saigumi »

In a way, they are already in there, you can use matrices and matrix transformation (quaternions).

The premise for a good portion of Irrlicht is to make it so that you don't have to worry about quaternions or matrices and can think about 3d in more simpler terms of rotation angles and direct X/Y/Z positioning.

If you really feel the need to get low level and make your own matrices, http://irrlicht.sourceforge.net/docu/cl ... trix4.html.
Crud, how do I do this again?
[dx/x]=HUNT3R
Posts: 271
Joined: Sat Aug 23, 2003 5:52 pm
Location: Hurricane Central, Florida

Post by [dx/x]=HUNT3R »

Just to get my 2 cents in... the quaternions aren't already in the engine and it would be cool if Niko did implement them but I don't know of any plans to do so. Quaternions can be used as a replacement for rotation matrices as they can describe a rotation around any axis in 3D space. They take up less space than matrices (4 numbers instead of 9), many operations such as multiplication are cheaper than with matrices, and conversion between quaternions and matrices is easy.
t

Post by t »

So at the moment irrlicht suffers from the gimbal lock problem, right?
[dx/x]=HUNT3R
Posts: 271
Joined: Sat Aug 23, 2003 5:52 pm
Location: Hurricane Central, Florida

Post by [dx/x]=HUNT3R »

I haven't had the need to experiment with it myself... but yes. Of course, it would be pretty simple to implement one's own quaternion class and add it to the Irrlicht engine. I might try that if I find the time...
keless
Posts: 805
Joined: Mon Dec 15, 2003 10:37 pm
Location: Los Angeles, California, USA

Post by keless »

I made the following class for the GTEngine, but if you'd like feel free to adapt it to the IrrLicht Engine:

http://skyesurfer.net/keless/download/Quaternion.h
http://skyesurfer.net/keless/download/Quaternion.cpp
Post Reply