osg::Camera example
阅读原文时间:2023年07月10日阅读:2

#ifdef _WIN32
#include
#endif // _WIN32
#include

#include
#include
#include

#include

#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include

#include
#include
#include
#include
#include
#include

#include
#include

int main()
{
osg::ref_ptr viewer1 = new osgViewer::Viewer;
osg::ref_ptr group1 = new osg::Group;
osg::ref_ptr camera1 = new osg::Camera;

osg::ref\_ptr<osg::Node> node1 = osgDB::readNodeFile("D:\\\\参考手册\\\\BIM\\\\osg\\\\build20190628.osgb");

camera1->addChild(node1);  
camera1->setViewport(, , , );  
camera1->setClearColor(osg::Vec4(0.0,0.0,0.0,0.0));

group1->addChild(node1.get());  
group1->addChild(camera1.get());

viewer1->setSceneData(group1.get());  
viewer1->setUpViewInWindow(, , , , );

viewer1->run();  

}

手机扫一扫

移动阅读更方便

阿里云服务器
腾讯云服务器
七牛云服务器

你可能感兴趣的文章