Did you try anything ?, did you look at the examples , this is shown in nearly every example and tutorial that use a group
osg::ref_ptr<osg::Group> parent = dynamic_cast<osg::Group *>(node->getChild(0)); But you might want to ensure that dynamic_cast<osg::Group *>(node->getChild(0)); actually returns a pointer and not null __________________________________________________________ Gordon Tomlinson [EMAIL PROTECTED] IM: [EMAIL PROTECTED] www.vis-sim.com <http://www.vis-sim.com/> www.gordontomlinson.com <http://www.gordontomlinson.com/> __________________________________________________________ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ruqin Zhang Sent: Sunday, October 19, 2008 9:37 PM To: OpenSceneGraph Users Subject: [osg-users] "osg::ref_ptr<osg::Group>" instead of "osg::Group *" Hi, I have the following code: osg::Group *parent = dynamic_cast<osg::Group *>(node->getChild(0)); Here, if I want to use "osg::ref_ptr<osg::Group>" instead of "osg::Group *", how can I implement it? Thanks!
_______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

