Steven Powers wrote:

This might be more of a general C++ question but I'm having the
following problem:

I have a MatrixTransform derived class called Entity
Ie. sgm::Entity : public MatrixTransform.

I use it to define a couple extra data values that I would like to store
and overload some of the inherited functions. I added a node with
geometry to the Entity via Entity::AddChild(node);

It works fine and behaves like I would expect when I add it to the scene
graph but when I use picking to pull the node out of the scene graph and
follow the path to its parental Entity I am unable to call dynamic_cast
on it and get a non-NULL result.

If I use the same procedure and instead try a dynamic cast to an
osg::MatrixTransform it works just fine.
What happens if you use a static_cast to Entity? Assuming you pick the right geometry of course (the one hanging from you Entity instance).

Paul
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to