[osg-users] Cast Drawable to ShapeDrawable
Christian Kunz
christian.kunz83 at gmail.com
Tue Jun 2 01:52:53 PDT 2015
Hi everyone,
I want to pick a geometry object in 3D-Space, e.g. a cylinder.
I use a LineSegmentIntersector to do so. Actually this is working fine. I can call
Code:
result.drawable.get();
on
Code:
const osgUtil::LineSegmentIntersector::Intersection& result = *(intersector->getIntersections().begin());
to get an osg::Drawable object:
Code:
osg::Drawable *tempDraw = result.drawable.get();
This gives me an osg::Drawable object. But the object is actually an osg::ShapeDrawable.
How can I cast it the right way to an osg::ShapeDrawable? Do I need to use a dynamic_cast?
...
Thank you!
Cheers,
Christian
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=63920#63920
More information about the osg-users
mailing list