osg模型网格化

#include
#include
#include

int main()
{
	auto pNode = osgDB::readNodeFile("tree.osg");
	if (nullptr == pNode)
	{
		OSG_WARN << "node is nullptr";
		return 1;
	}

	osgViewer::Viewer viewer;

	auto pRoot = new osg::Group;

	// 网格化
	auto pScribe = new osgFX::Scribe();
	pScribe->addChild(pNode);
	pRoot->addChild(pScribe);

	viewer.setSceneData(pRoot);

	return viewer.run();
}

osg模型网格化_第1张图片

osg模型网格化_第2张图片 

你可能感兴趣的:(VC++,图形学和3D,osg,网格)