Kob*_*kie 6 c++ openscenegraph
我希望有人知道为什么下面的代码失败了.我试图从osg :: Node*节点对象获取PositionAttitudeTransform(Openscenegraph类)的实例.但是下面的编译器错误以粗体显示.
void CameraPosCallbackUpdate::operator()(osg::Node* node, osg::NodeVisitor* nv)
{
// other code goes here
osg::PositionAttitudeTransform* pat = dynamic_cast<osg::PositionAttitudeTransform*> (node);
}
Run Code Online (Sandbox Code Playgroud)
IntelliSense:dynamic_cast中的类型必须是指向完整类类型的指针或引用,或者为void*
请帮助我以正确的方式访问我的对象,我将非常感谢帮助理解这里的问题,因为我相信演员应该是可能的.
http://www.openscenegraph.org/documentation/OpenSceneGraphReferenceDocs/a00529.html