Hi, I'm using getWorldMatrices of Node to transform local coordinates to world
coordinates.
Code:
hipsT->addChild(rightHipT);
rightHipT->addChild(rightKneeT);
rightKneeT->addChild(rightAnkleT);
rightAnkleT->addChild(rightFoot);
scene->addChild(hipsT);
osg::MatrixList worldMatrices = rightFoot->getWorldMatrices();
for(osg::MatrixList::iterator itr = worldMatrices.begin();
itr != worldMatrices.end();
++itr) {
osg::Matrix& matrix = *itr;
osg::Vec3 center = rightFoot->getBound().center() * matrix;
}
I took the code of for-cycle from here:
http://www.openscenegraph.org/projects/osg/wiki/Support/Tutorials/CameraControlFindingWorldCoordinates
These: hipsT, rightHipT, rightKneeT, rightAnkleT are PAT's and rightFoot is a
Node*. The question is why the of size of worldMatrices is just one matrix?
Shouldn't it have a matrix for each PAT?
Thank you!
Cheers,
Danny
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=22739#22739
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org