[osg-users] why geode==null,please read my following codes.Thanks。

Andre Simoes andrersimoes at gmail.com
Tue Nov 17 08:20:34 PST 2009


Most of the types you're trying to handle are Nodes as superclass.

Probably you'll have to use getNode for the case and than verify the class
with dynamic_cast
or className() that is a member from Node if you want to retrieve the class
type.

Andre Simoes

2009/11/17 Xiao Han <osgforum at tevs.eu>

> Thanks,Wang Ray
>
> It‘s not a geode. This is a Group.
>
> How can I get group's geodes? Thanks.
>
> Xiao Han
>
>
> Wang Rui wrote:
> > Hi Xiao Han,
> >
> > Check the root of 'road_deming.ive' first, is it really a geode?
> >
> > Cheers,
> > Wang Rui
> >
> >
> > 2009/11/17 Xiao Han < ()>
> >
> > > Hi,everyone,
> > >
> > > Please why gn==null in following codes?
> > >
> > > "
> > >                osgViewer::Viewer* viewer=new osgViewer::Viewer();
> > >        osg::Group*root= new osg::Group();
> > >        osg::Node*node=new osg::Node();
> > >        node=osgDB::readNodeFile("road_demimg.ive");//cow.osg");
> > >        osg::Geode* gn=dynamic_cast<osg::Geode*>(node);
> > > "
> > > Thank you!
> > >
> > > Cheers,
> > > Xiaohan
> > >
> > > ------------------
> > > Read this topic online here:
> > > http://forum.openscenegraph.org/viewtopic.php?p=19660#19660 (
> http://forum.openscenegraph.org/viewtopic.php?p=19660#19660)
> > >
> > >
> > >
> > >
> > >
> > > _______________________________________________
> > > osg-users mailing list
> > >  ()
> > >
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org(
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org)
> > >
> >
> >
> >  ------------------
> > Post generated by Mail2Forum
>
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=19738#19738
>
>
>
>
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20091117/bc26bdbd/attachment.htm>


More information about the osg-users mailing list