|
获取当前视点坐标:
osg::Vec3 ViewPositon;
osg::Vec3 center ;
osg::Vec3 up ;
while(!viewer->done())
{
osg->PreFrameUpdate();
viewer ->getCamera() ->getViewMatrixAsLookAt(ViewPositon, center, up) ;
viewer->frame();
osg->PostFrameUpdate();
}
报错:
error C2597: illegal reference to non-static member 'CCoreOSG::ViewPositon'
error C2597: illegal reference to non-static member 'CCoreOSG::center'
error C2597: illegal reference to non-static member 'CCoreOSG::up'
把那三个变量前面加上static,链接的时候又报错。
error LNK2001: unresolved external symbol "public: static class osg::Vec3f C**::up
不知道是跟线程有关系吗?还是什么原因,望各位高手指教.谢谢~~ |
|