Advertisement

CML get x y z w value from quaternion object

Started by July 27, 2012 12:00 PM
1 comment, last by Vastark 12 years, 6 months ago
hi every one..
i want to get x y z w value's from a cml::quaternionf object

my code :

cml::quaternionf cmlObjRot = cml::quaternionf(0.5f, 0, 0,0); //make an quaternion object with set x y z w value's

//now i want to get my x y z w i set in upper line code

float x,y,z,w;

float x=cmlObjRot.x ???? // how to get x value from my cmlObjRot object ? i think x value must be 0.5f

thank you.
Use operato [] to access the individual components.

float x=cmlObjRot[0];
Advertisement
Thank you so much Brother Bob.smile.png
worked !

This topic is closed to new replies.

Advertisement