#### Archived

This topic is now archived and is closed to further replies.

This topic is 5280 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

I''d like to use quaternions to my rotations in my engine. I''ve got three perpendicular vector(example view matrix), how to make from them a quaternion ? Put in a matrix ? If i want rotate around Z, i make four quaternions (1. 1/2 Pi rot., 2. Pi rot, 3. 3/2 Pi rot 4. 2Pi rot.). And if i have to rotate around z, i interpolate the precalculated quaternions for rotation. Is it worth ? Or is it a multi stupidity ?

##### Share on other sites
You can build a rotation matrix from a quaternion with the function D3DXMatrixRotationQuaternion(). Contrarywise, you can convert a rotation matrix to a quaternion with the function D3DXQuaternionRotationMatrix().

It is quite difficult to interpolate rotations using matrices so, yes, use quaternions - look up the function D3DXQuaternionSlerp().

[edited by - __Daedalus__ on June 4, 2004 4:07:44 PM]

1. 1
Rutin
40
2. 2
3. 3
4. 4
5. 5

• 18
• 19
• 12
• 14
• 9
• ### Forum Statistics

• Total Topics
633362
• Total Posts
3011531
• ### Who's Online (See full list)

There are no registered users currently online

×