[osg-users] Y up to Z up

Michael Weiblen mike.weiblen at gmail.com
Wed Apr 27 08:01:12 PDT 2011


Hi,

as a quick fix when loading the model, or just experimenting, you can
use the ".rot" pseudo loader to put a rotation above your model.

Something like:

osgviewer cow.osg.90,0,0.rot

cheers
-- mew


-- 
Mike Weiblen -- Black Hawk, Colorado USA -- http://mew.cx/


On Thu, Mar 31, 2011 at 4:09 AM, Aitor Ardanza <aitoraltube at terra.es> wrote:
> Hi,
>
> I need to do it for my proyect... but I can't get good results.
> OpenNI (Kinect) gives me the matrix with "Y up":
>
> Code:
> XnSkeletonJointPosition jointPos;
> g_UserGenerator.GetSkeletonCap().GetSkeletonJointPosition(player, eJoint, jointPos);
> XnMatrix3X3 orient;
> orient = jointOrient.orientation;
> tracker->set(orient.elements[0], orient.elements[1], orient.elements[2], 0,
> orient.elements[3], orient.elements[4], orient.elements[5], 0,
> orient.elements[6], orient.elements[7], orient.elements[8], 0,
> jointPos.position.X, jointPos.position.Y, jointPos.position.Z, 1);
>
>
> 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
>
> Code:
> tracker->postMult(C);
>
> ????
>
> Thank you!
>
> Cheers,
> Aitor
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=38104#38104
>
>
>
>
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>



More information about the osg-users mailing list