I hope there is someone who understands why the code below fails. I am trying to get an instance of the PositionAttitudeTransform class (Openscenegraph class) from an osg :: Node * node object. But there is a compiler error in bold.
void CameraPosCallbackUpdate::operator()(osg::Node* node, osg::NodeVisitor* nv) { // other code goes here osg::PositionAttitudeTransform* pat = dynamic_cast<osg::PositionAttitudeTransform*> (node); }
IntelliSense: the type in dynamic_cast must be a pointer or a reference to the full type of the class or void *
Please help me with the correct way to access my object, and I would appreciate help in understanding that the problem is here, since I believe that casting should be possible.
http://www.openscenegraph.org/documentation/OpenSceneGraphReferenceDocs/a00529.html
source share