Hi,
Node* ResetNodeMatrices( Node *node)
{
osg::Group* root = new osg::Group;
osg::Matrix matrix;
osg::MatrixTransform* transform = new osg::MatrixTransform;
matrix.makeIdentity();
transform->setMatrix(matrix);
root->addChild(transform);
transform->addChild(node);
return root->getChild(0);
}
It won't do. I meant you need to set the matrix from the "node" in the argument
of your function. Think about it, if the "node" contain a transform you want to
get ride of, what good is that you add an identity on top of it?
You need to find out what goes into the "node", for example, try
osg::MatrixTransform* transform = dynamic_cast<MatrixTransform*>(node);
then reset the matrix in transform to identity.
Thank you!
Cheers,
Rabbi
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=16258#16258
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org