我是靠谱客的博主 兴奋衬衫,这篇文章主要介绍【OSG】读取osgb倾斜数据,现在分享给大家,希望可以做个参考。

string data_dir = osgb_dir;
	//std::string ext = osgDB::getLowerCaseFileExtension(data_dir);
	osgDB::ReaderWriter::Options* options=NULL;
	std::string fileName = osgDB::findDataFile(osgb_dir, options);
	if (fileName.empty()) {
		OSG_INFO << "Reading file " << fileName <<"not found"<< std::endl;
		return;
	}
	osg::Group* g = new osg::Group;
	std::string dir = osgDB::getFilePath(fileName);
	std::string dataPath = dir + "\Data\";
	osgDB::DirectoryContents dirNames = osgDB::getDirectoryContents(dataPath);
	for each (std::string dir in dirNames)
	{
		if (dir.find(".") != std::string::npos)
			continue;
		std::string osgbFile = dataPath + dir + "\" + dir + ".osgb";
		g->addChild(osgDB::readNodeFile(osgbFile));
	}
 

 

最后

以上就是兴奋衬衫最近收集整理的关于【OSG】读取osgb倾斜数据的全部内容,更多相关【OSG】读取osgb倾斜数据内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(52)

评论列表共有 0 条评论

立即
投稿
返回
顶部