Hi All,

I have an 3D Gyro model, and every scenegraph of this model like that;

Root
||
WorldMatrixTransform
||
LocalMatrixTransform
||                             ||
Planetary            YawMatrixTransform (this is inverse multiplex of
planetary's parent matrix transforms)
                            ||
                        WorldMatrixTransform
                            ||
                        LocalMatrixTransform
                            ||                         ||
                        Yaw                       RollMatrixTransform (this
is inverse multiplex of yaw's parent matrix transforms)
                                                       ||
                                                      WorldMatrixTransform
                                                       ||
                                                      LocalMatrixTransform

||                              ||
                                                      Roll
PitchMatrixTransform (this is inverse multiplex of roll's matrix transforms)

||

etc........

I want to find Yaw node's world coordinates but can't. I have tried;
osg::MatrixList matrices = yaw->getWorldMatrices();
osg::Vec3 pos = matrices.empty() ? node->getBound().center() :
node->getBound().center() * matrices[0];
But it doen't work. I multiply all matrices[?] but can't get right
coordinate.

Ho can I follow a node? I don't ask about canned NodeTrackerManipulater. I
am using makeLookAt function to change the camera matrix (
viewer.get()->getCamera()->setViewMatrix(cameraMatrix) ) and trying to get
center coordinate where should I look.

I will place the camera constant point and only follow the object which will
be rotating on Z direction. I only need center coordinate of node.

Regards.

-- 
Ümit Uzun
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to