Hi osg-users, My problem is that I want to add a specific transformation on a model, like a projection on a another model. So I decided to get each vertex of the first model and to compute it's intersection on the other model. To do that I need to access each vertex of my osg::node wich represent my model.
First problem : I don't succeed to cast my osg::node in osg::Drawable without having a null pointer. Here is my sample code : osg::Node* nodeProj = (osg::Node*) sg->getSceneGraphModel(projID); if (!nodeProj) return false; osg::Group* group = nodeModel->asGroup(); osg::Drawable* drawable = dynamic_cast<osg::Drawable*> (group); ProjectionFunctor pf; if(drawable) drawable->accept(pf); The struct ProjectionFunctor is derived from osg::PrimitiveFunctor like ComputeBound in Drawable.cpp, and for now it makes nothing because my drawable is null, and I'm becomming crazy about that. Is there any better way to get vertex data ?? Thank you all
_______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
