开始学习OSG
2013-11-15 16:52
260 查看
#ifdef _DEBUG #pragma comment(lib,"osgViewerd.lib") #pragma comment(lib,"osgDBd.lib") #pragma comment(lib,"OpenThreadsd.lib") #pragma comment(lib,"osgd.lib") #else #pragma comment(lib,"osgViewer.lib") #pragma comment(lib,"osgDB.lib") #pragma comment(lib,"OpenThreads.lib") #pragma comment(lib,"osgUtil.lib") #pragma comment(lib,"osg.lib") #endif #include <osgDB/ReadFile> #include <osgViewer/Viewer> #include <osgViewer/ViewerEventHandlers> #include <osg/MatrixTransform> #include <osg/Node> int main() { osg::ref_ptr<osgViewer::Viewer> viewer = new osgViewer::Viewer; osg::ref_ptr<osg::Group> gp= new osg::Group; osg::ref_ptr<osg::Node> cowNode = osgDB::readNodeFile("cow.osg"); gp->addChild(cowNode); osg::ref_ptr<osg::MatrixTransform > yaw= new osg::MatrixTransform; yaw->setMatrix(osg::Matrix::rotate(osg::DegreesToRadians(-45.0),0,1,0)*osg::Matrix::translate(0,0,3)); yaw->addChild(cowNode); gp->addChild(yaw); viewer->setSceneData(gp); return viewer->run(); }
相关文章推荐
- 开始学习OSG
- 开始学习OSG
- 从L inux开始大数据的学习
- 又快一年没来CSDN了,记录一下,从今天开始写写segment-routing相关的学习记录
- 1.1.5开始学习hadoop--hdfs命令
- 一句老话:学习贵在坚持,开始学习《Asp.net 程序设计》
- 开始写学习博客啦~!
- BootStrap学习从现在开始
- [CUDA学习笔记]从Hello Cuda开始
- MFC学习笔记四 用鼠标设定文字显示开始位置
- osg学习函数用法addPrimitiveSet +模型操作
- 开始学习oracle
- 开始学习C++
- 0521开始学习打卡
- ios程序猿学习Swift 第一天 从Hello World开始
- 开始学习python
- 开始学习node.js了,第一节,fs文件系统 【fs.rename】重命名文件/文件夹
- 开始学习Android啦!
- MySQL——学习开始(MySQL安装)
- 大数据技术学习之路,从今天开始