Hi lucie,
you do something like this
class CollectMatrixTransformNodeVisitor : public osg::NodeVisitor
{
public:
CollectMatrixTransformNodeVisitor() :
osg::NodeVisitor(osg::NodeVisitor::TRAVERSE_ALL_CHILDREN) {}
virtual void apply(osg::MatrixTransform& node)
{
matrixTransforms.push_back(&node);
}
std::vector<osg::MatrixTransform*> matrixTransforms;
};
then
CollectMatrixTransformNodeVisitor nv;
root->accept(nv);
nv.matrixTransforms vector should have all your MatrixTransforms
-Nick
On Wed, Jul 21, 2010 at 4:39 PM, lucie lemonnier
<[email protected]>wrote:
> Hi,
> I know how to create a node visitor but I don't know how to traverse the
> node and simultaneously retrieve and store the MatrixTransform.
> Can you help me?
>
> Thank you!
>
> lucie
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=30163#30163
>
>
>
>
>
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org