This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Setting co-efficients of Quaternion4f

Tags: None
(comma "," separated)
mcprakash
Registered Member
Posts
2
Karma
0

Setting co-efficients of Quaternion4f

Sat Aug 16, 2014 11:53 pm
Hi
I just wanted to set the co-effs of a quaternion4f after declaration. I could not find any function that does that. Can you please tell me if there is a function to set the co-effs of quaternion4f after declaration.

Code: Select all
void main()
{
Quaternion4f orient(1,0,0,0);
...
...
// I want to change my orient co-effs here after a few lines of code
}


Chandra ;)
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS
The standard C++ way:
Code: Select all
orient = Quaternion(w,x,y,z);

or
Code: Select all
orient.coeffs() << x,y,z,w;


Bookmarks



Who is online

Registered users: Bing [Bot], claydoh, Google [Bot], rblackwell, Yahoo [Bot]