Sorry, Paul. I didn't understand what you said in your last email about
trying to pick a Drawable that isn't Geometry. What do you mean by that? My
shapes are ShapeDrawables that are connected to a Geode and then to a
MatrixTransform.
If you are trying to pick a ShapeDrawable, then you are trying to pick a
Drawable that isn't a Geometry. ShapeDrawable and Geometry both derive from
Drawable, therefore ShapeDrawable is a Drawable but is not a Geometry.
I honestly have no idea on where to begin to derive my own intersector...
Can you give me a hand? Thanks.
First, I apologize. Ignore my previous post, which said you needed to create
a new Intersector to intersect a ShapeDrawable. I was wrong. In fact, the
current Intersector classes in osgUtil are fine. The problem is entirely
with ShapeDrawable.
Here's your problem:
void ShapeDrawable::accept(ConstAttributeFunctor&) const
{
}
That's ShapeDrawable.cpp, about line 1805. Compare that to the definition of
Geometry::accept(), which actually does something.
I'm not sure Robert ever intended ShapeDrawables to be used in anything
other than examples, perhaps he can comment. Certainly when Robert added the
new intersection classes in osgUtil, he did not implement this necessary
method in ShapeDrawable.
My advice: Don't use ShapeDrawable to draw spheres. Use Geometry instead.
The osgUtil Intersector classes work with Geometry because
Geometry::accept() actually contains code.
-Paul
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org