Hi MArtin, Danny,
It isn't, worldmatrices is a list of all the individual matrices up the leg to the top.
No - getWorldMatrices() returns the list of the localToWorld matrices for all paths from the node to the root. So if your node has only one path from itself to the root, then getWorldMatrices() will return only one matrix as it does for you.
So in other words, it doesn't return every matrix from the node to the root, it returns a single matrix for each path which contains the whole transform from local to world space.
This is because a scene graph in OSG is not a tree (where each node would have a single parent) but a DAG (directed acyclic graph - where each node may have multiple parents). So there may be multiple paths from any node to the root. Only you can know if there is only one, OSG can't know this, so it gives you a function to get localToWorld matrices for all paths and then lets you decide if you want to use just one of them, all of them, or whatever you want.
And if you look at what the for loop does, it gives you a different osg::Vec3 for each element of worldMatrices... So that's a different world-space position for each path from the node to the root.
Hope this helps, J-S -- ______________________________________________________ Jean-Sebastien Guay [email protected] http://www.cm-labs.com/ http://whitestar02.webhop.org/ _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

