Thomas Simon wrote:
Thanks for your interest and help
The wiimotion plus gives 3 around-axis speeds which I transforme into angles
the fact is that the pat keep turning around the OSG basic axis and not in the
wiimote basic axis.
I also think that I got a gimbal lock :(
I try a makeRotate with an old X-axis (for exemple) and a new X axis calculated and do the same for Y and Z. It gived no result :?
You might take a look at Quat.cpp and Quat.h in osgWorks
(osgworks.googlecode.com). It has a helper function makeHPRQuat() to
create a heading-pitch-roll transformation. Rotations are computed in
that order: first, the orientation is transformed by the heading angle
around the up vector. Next, the orientation is transformed by the pitch
angle around the _oriented_ right vector. Finally, the orientation is
transformed by the roll angle around the oriented _and_ pitched forward
vector.
If this doesn't do what you want, perhaps it will serve as inspiration
for your final solution.
-Paul
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org