|
本帖最后由 颂鼎 于 2015-1-3 14:00 编辑
-
- #include <osg/Geode>
- #include <osgViewer/Viewer>
- #include <osg/StateSet>
- #include <osg/Camera>
- #include <osg/MatrixTransform>
- #include <osg/Switch>
- #pragma comment(lib,"OpenThreadsd.lib")
- #pragma comment(lib,"osgd.lib")
- #pragma comment(lib,"osgDBd.lib")
- #pragma comment(lib,"osgAPExd.lib")
- #pragma comment(lib,"osgGAd.lib")
- #pragma comment(lib,"osgUtild.lib")
- #pragma comment(lib,"osgTextd.lib")
- #pragma comment(lib,"osgSimd.lib")
- #pragma comment(lib,"osgViewerd.lib")
- using namespace osg;
- class cbase :public Switch{
- public:
- cbase(){};
- virtual ~cbase(){};
- };
- class sub : public cbase{
- public:
- sub(){};
- ~sub(){};
- void Update(){};
- };
- int _tmain(int argc, _TCHAR* argv[])
- {
- osg::ref_ptr<cbase> pBase = new sub;
- sub* pSub = dynamic_cast<sub*>(pBase.Release());
-
- return 0;
- }
复制代码 |
|