Alberto Luaces wrote: > "Aitor Ardanza" writes: > > > > What I have to do to swap the Z and Y axes? multiply that by the matrix C? > > C = 1 0 0 0 > > 0 0 1 0 > > 0 1 0 0 > > 0 0 0 1 > > > > That would swap, but also invert some axis (det C = -1). Not sure if > that is your intention. > > -- > Alberto > > _______________________________________________ > osg-users mailing list > > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > ------------------ > Post generated by Mail2Forum
Hi Alberto, Yes, if I multiply it by C deforms avatar. reedev wrote: > Hi Aitor, > > I don't have a solution (but I am following your work with great > interest!) but maybe the Ogre example on openni.org might give you some > clues. It can be found here: > https://github.com/OpenNI/SampleAppSinbad > > cheers, have fun > Raymond > Hi reedev, I've looked at the ogre code example ... but ogre uses "Y up" too, but defines the matrix denying some values ... I do not know why, is to invert the matrix? Code: Ogre::Matrix3 matOri(jointOri.orientation.elements[0],-jointOri.orientation.elements[1],jointOri.orientation.elements[2], -jointOri.orientation.elements[3],jointOri.orientation.elements[4],-jointOri.orientation.elements[5], jointOri.orientation.elements[6],-jointOri.orientation.elements[7],jointOri.orientation.elements[8]); Without any change in the matrix, rotations are fine, but the Z and Y axes are exchanged ... If I try to get the euler angles of the array and create a new one with the Z and Y axes swapped, It makes me a curious thing. Let's say an arm turns well but the other does the opposite. I'll keep doing tests ... thanks for the replies! ------------------ Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=38115#38115 _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

