資源簡介
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個文件信息
評論
共有 條評論