|
int main(int, char**)
{
osgViewer::Viewer viewer;
osg::ref_ptr<osg::Group> root = new osg::Group();
root->addChild(osgDB::readNodeFile("cessna.osg"));
osg::ref_ptr<osg::Node> cow = osgDB::readNodeFile("cow.osg");
osg::ref_ptr<osgFX::Scribe> sc = new osgFX::Scribe();
sc->addChild(cow.get());
root->addChild(cow.get());
root->addChild(sc.get());
viewer.setSceneData(root.get());
viewer.addEventHandler(new CPickHandler(&viewer));
viewer.realize();
viewer.run();
return 0;
}
viewer.addEventHandler(new CPickHandler(&viewer));这里一直有报错:
错误 1 error C2061: 语法错误: 标识符“CPickHandler” g:\osgstudy\day2\eventhandler\eventhandler\addevent.cpp 42 1 EventHandler
有人知道是为什么吗
|
|