资源简介
OpenSceneGraph-OpenSceneGraph-3.4.0.rar
代码片段和文件信息
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
*
* This application is open source and may be redistributed and/or modified
* freely and without restriction both in commercial and non commercial applications
* as long as this copyright notice is maintained.
*
* This application is distributed in the hope that it will be useful
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*/
#include
#include
#include
#include
#include
#include
#include
#include
#include
int main( int argc char **argv )
{
// use an ArgumentParser object to manage the program arguments.
osg::ArgumentParser arguments(&argcargv);
// set up the usage document in case we need to print out how to use this program.
arguments.getApplicationUsage()->setApplicationName(arguments.getApplicationName());
arguments.getApplicationUsage()->setDescription(arguments.getApplicationName()+“ is an application for collecting a set of separate files into a single archive file that can be later read in OSG applications..“);
arguments.getApplicationUsage()->setCommandLineUsage(arguments.getApplicationName()+“ [options] filename ...“);
// if user request help write it out to cout.
if (arguments.read(“-h“) || arguments.read(“--help“))
{
arguments.getApplicationUsage()->write(std::cout);
return 1;
}
std::string archiveFilename;
while (arguments.read(“-a“archiveFilename) || arguments.read(“--archive“archiveFilename))
{
}
bool insert = false;
while (arguments.read(“-i“) || arguments.read(“--insert“))
{
insert = true;
}
bool extract = false;
while (arguments.read(“-e“) || arguments.read(“--extract“))
{
extract = true;
}
bool list = false;
while (arguments.read(“-l“) || arguments.read(“--list“))
{
list = true;
}
typedef std::vector FileNameList;
FileNameList files;
for(int pos=1;pos {
if (!arguments.isOption(pos))
{
if (insert)
{
std::string filePath = osgDB::findDataFile(arguments[pos]);
osgDB::FileType fileType = osgDB::fileType(filePath);
if (fileType==osgDB::REGULAR_FILE)
{
files.push_back(arguments[pos]);
}
else if (fileType==osgDB::DIRECTORY)
{
osgDB::DirectoryContents directory = osgDB::getDirectoryContents(arguments[pos]);
osgDB::DirectoryContents::iterator it = directory.begin();
while( it != directory.end())
{
files.push_back(filePath + “/“ +
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
....... 980 2015-08-12 04:13 OpenSceneGraph-OpenSceneGraph-3.4.0\applications\CMakeLists.txt
....... 63 2015-08-12 04:13 OpenSceneGraph-OpenSceneGraph-3.4.0\applications\osgarchive\CMakeLists.txt
....... 208 2015-08-12 04:13 OpenSceneGraph-OpenSceneGraph-3.4.0\applications\osgarchive\GNUmakefile.inst
....... 6729 2015-08-12 04:13 OpenSceneGraph-OpenSceneGraph-3.4.0\applications\osgarchive\osgarchive.cpp
....... 133 2015-08-12 04:13 OpenSceneGraph-OpenSceneGraph-3.4.0\applications\osgconv\CMakeLists.txt
....... 289 2015-08-12 04:13 OpenSceneGraph-OpenSceneGraph-3.4.0\applications\osgconv\GNUmakefile.inst
....... 2361 2015-08-12 04:13 OpenSceneGraph-OpenSceneGraph-3.4.0\applications\osgconv\OrientationConverter.cpp
....... 998 2015-08-12 04:13 OpenSceneGraph-OpenSceneGraph-3.4.0\applications\osgconv\OrientationConverter.h
....... 33004 2015-08-12 04:13 OpenSceneGraph-OpenSceneGraph-3.4.0\applications\osgconv\osgconv.cpp
....... 107 2015-08-12 04:13 OpenSceneGraph-OpenSceneGraph-3.4.0\applications\osgfilecache\CMakeLists.txt
....... 15197 2015-08-12 04:13 OpenSceneGraph-OpenSceneGraph-3.4.0\applications\osgfilecache\osgfilecache.cpp
....... 267 2015-08-12 04:13 OpenSceneGraph-OpenSceneGraph-3.4.0\applications\osgversion\CMakeLists.txt
....... 27393 2015-08-12 04:13 OpenSceneGraph-OpenSceneGraph-3.4.0\applications\osgversion\Contributors.cpp
....... 185 2015-08-12 04:13 OpenSceneGraph-OpenSceneGraph-3.4.0\applications\osgversion\GNUmakefile.inst
....... 5482 2015-08-12 04:13 OpenSceneGraph-OpenSceneGraph-3.4.0\applications\osgversion\osgversion.cpp
....... 61 2015-08-12 04:13 OpenSceneGraph-OpenSceneGraph-3.4.0\applications\osgviewer\CMakeLists.txt
....... 240 2015-08-12 04:13 OpenSceneGraph-OpenSceneGraph-3.4.0\applications\osgviewer\GNUmakefile.inst
....... 7085 2015-08-12 04:13 OpenSceneGraph-OpenSceneGraph-3.4.0\applications\osgviewer\osgviewer.cpp
....... 13059 2015-08-12 04:13 OpenSceneGraph-OpenSceneGraph-3.4.0\applications\present3D\Cluster.cpp
....... 9539 2015-08-12 04:13 OpenSceneGraph-OpenSceneGraph-3.4.0\applications\present3D\Cluster.h
....... 3330 2015-08-12 04:13 OpenSceneGraph-OpenSceneGraph-3.4.0\applications\present3D\CMakeLists.txt
....... 6313 2015-08-12 04:13 OpenSceneGraph-OpenSceneGraph-3.4.0\applications\present3D\ExportHTML.cpp
....... 925 2015-08-12 04:13 OpenSceneGraph-OpenSceneGraph-3.4.0\applications\present3D\ExportHTML.h
....... 2741 2015-08-12 04:13 OpenSceneGraph-OpenSceneGraph-3.4.0\applications\present3D\PointsEventHandler.cpp
....... 1419 2015-08-12 04:13 OpenSceneGraph-OpenSceneGraph-3.4.0\applications\present3D\PointsEventHandler.h
....... 34056 2015-08-12 04:13 OpenSceneGraph-OpenSceneGraph-3.4.0\applications\present3D\present3D.cpp
....... 8771 2015-08-12 04:13 OpenSceneGraph-OpenSceneGraph-3.4.0\applications\present3D\ReadShowFile.cpp
....... 1228 2015-08-12 04:13 OpenSceneGraph-OpenSceneGraph-3.4.0\applications\present3D\ReadShowFile.h
....... 5375 2015-08-12 04:13 OpenSceneGraph-OpenSceneGraph-3.4.0\applications\present3D\SDLIntegration.cpp
....... 2178 2015-08-12 04:13 OpenSceneGraph-OpenSceneGraph-3.4.0\applications\present3D\SDLIntegration.h
............此处省略3910个文件信息
相关资源
- OsgEarth2.8 使用高程和影像
- osg经典入门教程
- 用OSG实现的实时仿真的雷达波效果
- osg天空盒源程序
- OSG载入地形和模型文件
- OpenSceneGraph快速入门指导.pdf
- OpenSceneGraph三维渲染引擎设计与实践
- osg 海量数据处理
- OSG3.4.0第三方库VS2015 x64
- OSG 3dparty VS2015(x86
- OSG 3dparty VS2015(x64)64位三方库
- osgOcean update
-
osgEarthPla
yer.rar - 模型格式转换工具(osgb-obj-ive)
- OSG3.4.0库已编译好,VS2013+WIN10
- OpenSceneGraph-3.4.0MinGW编译版
- osgRiver: 基于osgOcean的基于河流渲染的
- OSG3.6 API开发手册
- vs2010编译osg3.2.1,带有osgQtd.lib和osgQ
- 路径漫游中使用到的ceep.ive数据
- osgb.osg.ive.obj互转工具
- osgb/ive/osg/obj模型格式互转工具
- OpenSceneGraph3Cookbook
- 倾斜摄影数据,osgb格式的
- osg3.6.4-osgEarth2.10.2-x86-x64-VS2019开发库
- CISSP Official Study Guide Eighth Edition(OS
- OSG阴影数据模型
- CISSP 官方习题集(英文版)
- Osg3.4和OsgEarth2.8编译库_x64.7z
- OSGi原理与最佳实践(完整版).PDF
评论
共有 条评论