Hello Renan,
> 1>.\Classe Pick Handler.cpp(23) : error C2682: cannot use 'dynamic_cast' to
> convert from 'osg::ref_ptr<T>' to 'osg::ShapeDrawable *'
> 1> with
> 1> [
> 1> T=osg::Drawable
> 1> ]
>
> given that the line where the error ocurred was:
> osg::ShapeDrawable* shapedrawable =
> dynamic_cast<osg::ShapeDrawable*>(hitr->drawable);
>
> Can you tell me what's wrong?
hitr->drawable is not an osg::Drawable* like I thought, but a
ref_ptr<osg::Drawable>. Just add .get() to the end, like this, to get
the pointer.
osg::ShapeDrawable* shapedrawable =
dynamic_cast<osg::ShapeDrawable*>(hitr->drawable.get());
Sorry for not mentioning the code was not tested. It was just an example...
J-S
--
______________________________________________________
Jean-Sebastien Guay [EMAIL PROTECTED]
http://whitestar02.webhop.org/
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org