osgDB Namespace Reference


Classes

class  Archive
class  DatabasePager
class  DotOsgWrapper
class  DynamicLibrary
class  Field
class  FieldReader
class  FieldReaderIterator
class  ImageOptions
class  Input
class  Output
class  ParameterOutput
class  ReaderWriter
class  ReentrantMutex
struct  basic_type_wrapper
struct  type_wrapper
class  Registry
class  RegisterDotOsgWrapperProxy
class  RegisterReaderWriterProxy
class  SharedStateManager

Typedefs

typedef std::vector< std::string > DirectoryContents
typedef std::deque< std::string > FilePathList

Enumerations

enum  CaseSensitivity { CASE_SENSITIVE, CASE_INSENSITIVE }
enum  FileType { FILE_NOT_FOUND, REGULAR_FILE, DIRECTORY }

Functions

OSGDB_EXPORT ArchiveopenArchive (const std::string &filename, Archive::ArchiveStatus status, unsigned int indexBlockSizeHint=4096)
OSGDB_EXPORT ArchiveopenArchive (const std::string &filename, Archive::ArchiveStatus status, unsigned int indexBlockSizeHint, ReaderWriter::Options *options)
OSGDB_EXPORT std::string getFilePath (const std::string &filename)
OSGDB_EXPORT std::string getFileExtension (const std::string &filename)
OSGDB_EXPORT std::string getLowerCaseFileExtension (const std::string &filename)
OSGDB_EXPORT std::string getSimpleFileName (const std::string &fileName)
OSGDB_EXPORT std::string getNameLessExtension (const std::string &fileName)
OSGDB_EXPORT std::string getStrippedName (const std::string &fileName)
OSGDB_EXPORT std::string convertFileNameToWindowsStyle (const std::string &fileName)
OSGDB_EXPORT std::string convertFileNameToUnixStyle (const std::string &fileName)
OSGDB_EXPORT bool isFileNameNativeStyle (const std::string &fileName)
OSGDB_EXPORT std::string convertFileNameToNativeStyle (const std::string &fileName)
OSGDB_EXPORT bool equalCaseInsensitive (const std::string &lhs, const std::string &rhs)
OSGDB_EXPORT bool equalCaseInsensitive (const std::string &lhs, const char *rhs)
OSGDB_EXPORT bool containsServerAddress (const std::string &filename)
OSGDB_EXPORT std::string getServerAddress (const std::string &filename)
OSGDB_EXPORT std::string getServerFileName (const std::string &filename)
OSGDB_EXPORT bool makeDirectory (const std::string &directoryPath)
OSGDB_EXPORT bool makeDirectoryForFile (const std::string &filePath)
OSGDB_EXPORT bool fileExists (const std::string &filename)
OSGDB_EXPORT FileType fileType (const std::string &filename)
OSGDB_EXPORT std::string findFileInPath (const std::string &filename, const FilePathList &filePath, CaseSensitivity caseSensitivity=CASE_SENSITIVE)
OSGDB_EXPORT std::string findFileInDirectory (const std::string &fileName, const std::string &dirName, CaseSensitivity caseSensitivity=CASE_SENSITIVE)
OSGDB_EXPORT DirectoryContents getDirectoryContents (const std::string &dirName)
void setDataFilePathList (const FilePathList &filepath)
void setDataFilePathList (const std::string &paths)
FilePathListgetDataFilePathList ()
OSGDB_EXPORT std::string findDataFile (const std::string &filename, CaseSensitivity caseSensitivity=CASE_SENSITIVE)
OSGDB_EXPORT std::string findDataFile (const std::string &filename, const ReaderWriter::Options *options, CaseSensitivity caseSensitivity=CASE_SENSITIVE)
void setLibraryFilePathList (const FilePathList &filepaths)
void setLibraryFilePathList (const std::string &paths)
FilePathListgetLibraryFilePathList ()
OSGDB_EXPORT std::string findLibraryFile (const std::string &filename, CaseSensitivity caseSensitivity=CASE_SENSITIVE)
OSGDB_EXPORT void convertStringPathIntoFilePathList (const std::string &paths, FilePathList &filepath)
OSGDB_EXPORT void appendPlatformSpecificLibraryFilePaths (FilePathList &filepath)
OSGDB_EXPORT void appendPlatformSpecificResourceFilePaths (FilePathList &filepath)
template<class Iterator>
void writeArray (Output &fw, Iterator first, Iterator last, int noItemsPerLine=0)
template<class Iterator>
void writeArrayAsInts (Output &fw, Iterator first, Iterator last, int noItemsPerLine=0)
OSGDB_EXPORT osg::ObjectreadObjectFile (const std::string &filename, const ReaderWriter::Options *options)
osg::ObjectreadObjectFile (const std::string &filename)
OSGDB_EXPORT osg::ImagereadImageFile (const std::string &filename, const ReaderWriter::Options *options)
osg::ImagereadImageFile (const std::string &filename)
OSGDB_EXPORT osg::HeightFieldreadHeightFieldFile (const std::string &filename, const ReaderWriter::Options *options)
osg::HeightFieldreadHeightFieldFile (const std::string &filename)
OSGDB_EXPORT osg::NodereadNodeFile (const std::string &filename, const ReaderWriter::Options *options)
osg::NodereadNodeFile (const std::string &filename)
OSGDB_EXPORT osg::NodereadNodeFiles (std::vector< std::string > &commandLine, const ReaderWriter::Options *options)
osg::NodereadNodeFiles (std::vector< std::string > &commandLine)
OSGDB_EXPORT osg::NodereadNodeFiles (osg::ArgumentParser &parser, const ReaderWriter::Options *options)
osg::NodereadNodeFiles (osg::ArgumentParser &parser)
void readCommandLine (osg::ArgumentParser &parser)
OSGDB_EXPORT bool writeObjectFile (const osg::Object &object, const std::string &filename)
OSGDB_EXPORT bool writeImageFile (const osg::Image &image, const std::string &filename)
OSGDB_EXPORT bool writeHeightFieldFile (const osg::HeightField &hf, const std::string &filename)
OSGDB_EXPORT bool writeNodeFile (const osg::Node &node, const std::string &filename)


Detailed Description

The osgDB library provides support for reading and writing scene graphs, providing a plugin framework and file utility classes. The plugin framework in centred around the osgDB::Registry, and allows plugins which provide specific file format support to be dynamically loaded on demand.


Typedef Documentation

typedef std::vector<std::string> osgDB::DirectoryContents

simple list of names to represent a directory's contents.

typedef std::deque<std::string> osgDB::FilePathList

list of directories to search through which searching for files.


Enumeration Type Documentation

enum osgDB::CaseSensitivity

Enumerator:
CASE_SENSITIVE 
CASE_INSENSITIVE 

enum osgDB::FileType

Enumerator:
FILE_NOT_FOUND 
REGULAR_FILE 
DIRECTORY 


Function Documentation

OSGDB_EXPORT Archive* osgDB::openArchive ( const std::string &  filename,
Archive::ArchiveStatus  status,
unsigned int  indexBlockSizeHint = 4096 
)

Open an archive for reading or writing.

OSGDB_EXPORT Archive* osgDB::openArchive ( const std::string &  filename,
Archive::ArchiveStatus  status,
unsigned int  indexBlockSizeHint,
ReaderWriter::Options *  options 
)

Open an archive for reading or writing.

OSGDB_EXPORT std::string osgDB::getFilePath ( const std::string &  filename  ) 

OSGDB_EXPORT std::string osgDB::getFileExtension ( const std::string &  filename  ) 

OSGDB_EXPORT std::string osgDB::getLowerCaseFileExtension ( const std::string &  filename  ) 

OSGDB_EXPORT std::string osgDB::getSimpleFileName ( const std::string &  fileName  ) 

OSGDB_EXPORT std::string osgDB::getNameLessExtension ( const std::string &  fileName  ) 

OSGDB_EXPORT std::string osgDB::getStrippedName ( const std::string &  fileName  ) 

OSGDB_EXPORT std::string osgDB::convertFileNameToWindowsStyle ( const std::string &  fileName  ) 

OSGDB_EXPORT std::string osgDB::convertFileNameToUnixStyle ( const std::string &  fileName  ) 

OSGDB_EXPORT bool osgDB::isFileNameNativeStyle ( const std::string &  fileName  ) 

OSGDB_EXPORT std::string osgDB::convertFileNameToNativeStyle ( const std::string &  fileName  ) 

OSGDB_EXPORT bool osgDB::equalCaseInsensitive ( const std::string &  lhs,
const std::string &  rhs 
)

OSGDB_EXPORT bool osgDB::equalCaseInsensitive ( const std::string &  lhs,
const char *  rhs 
)

OSGDB_EXPORT bool osgDB::containsServerAddress ( const std::string &  filename  ) 

OSGDB_EXPORT std::string osgDB::getServerAddress ( const std::string &  filename  ) 

OSGDB_EXPORT std::string osgDB::getServerFileName ( const std::string &  filename  ) 

OSGDB_EXPORT bool osgDB::makeDirectory ( const std::string &  directoryPath  ) 

OSGDB_EXPORT bool osgDB::makeDirectoryForFile ( const std::string &  filePath  ) 

OSGDB_EXPORT bool osgDB::fileExists ( const std::string &  filename  ) 

return true if a file exisits.

OSGDB_EXPORT FileType osgDB::fileType ( const std::string &  filename  ) 

return type of file.

OSGDB_EXPORT std::string osgDB::findFileInPath ( const std::string &  filename,
const FilePathList filePath,
CaseSensitivity  caseSensitivity = CASE_SENSITIVE 
)

find specified file in specified file path.

OSGDB_EXPORT std::string osgDB::findFileInDirectory ( const std::string &  fileName,
const std::string &  dirName,
CaseSensitivity  caseSensitivity = CASE_SENSITIVE 
)

return the directory/filename of a file if its is contained within specified directory. return "" if directory does not contain file. If caseInsensitive is set to true then a case insensitive comparison is used to compare fileName to directory contents. This is useful when unix programs attempt read case insentive windows filenames.

OSGDB_EXPORT DirectoryContents osgDB::getDirectoryContents ( const std::string &  dirName  ) 

return the contents of a directory. returns an empty array on any error.

void osgDB::setDataFilePathList ( const FilePathList filepath  )  [inline]

void osgDB::setDataFilePathList ( const std::string &  paths  )  [inline]

FilePathList& osgDB::getDataFilePathList (  )  [inline]

OSGDB_EXPORT std::string osgDB::findDataFile ( const std::string &  filename,
CaseSensitivity  caseSensitivity = CASE_SENSITIVE 
)

Search for specified file in file system, checking the DataFilePathList for possible paths, returning the full path of the first valid file found, return an empty string if no string is found.

OSGDB_EXPORT std::string osgDB::findDataFile ( const std::string &  filename,
const ReaderWriter::Options *  options,
CaseSensitivity  caseSensitivity = CASE_SENSITIVE 
)

Search for specified file in file system, checking first the database path set in the Options structure, then the DataFilePathList for possible paths, returning the full path of the first valid file found, return an empty string if no string is found.

void osgDB::setLibraryFilePathList ( const FilePathList filepaths  )  [inline]

void osgDB::setLibraryFilePathList ( const std::string &  paths  )  [inline]

FilePathList& osgDB::getLibraryFilePathList (  )  [inline]

OSGDB_EXPORT std::string osgDB::findLibraryFile ( const std::string &  filename,
CaseSensitivity  caseSensitivity = CASE_SENSITIVE 
)

OSGDB_EXPORT void osgDB::convertStringPathIntoFilePathList ( const std::string &  paths,
FilePathList filepath 
)

convert a string containing a list of paths deliminated either with ';' (Windows) or ':' (All other platforms) into FilePath represetation.

OSGDB_EXPORT void osgDB::appendPlatformSpecificLibraryFilePaths ( FilePathList filepath  ) 

OSGDB_EXPORT void osgDB::appendPlatformSpecificResourceFilePaths ( FilePathList filepath  ) 

template<class Iterator>
void osgDB::writeArray ( Output &  fw,
Iterator  first,
Iterator  last,
int  noItemsPerLine = 0 
)

template<class Iterator>
void osgDB::writeArrayAsInts ( Output &  fw,
Iterator  first,
Iterator  last,
int  noItemsPerLine = 0 
)

OSGDB_EXPORT osg::Object* osgDB::readObjectFile ( const std::string &  filename,
const ReaderWriter::Options *  options 
)

Read an osg::Object from file. Return valid osg::Object on success, return NULL on failure. Use the Options object to control cache operations and file search paths in osgDB::Registry. The osgDB::Registry is used to load the appropriate ReaderWriter plugin for the filename extension, and this plugin then handles the request to read the specified file.

osg::Object* osgDB::readObjectFile ( const std::string &  filename  )  [inline]

Read an osg::Object from file. Return valid osg::Object on success, return NULL on failure. The osgDB::Registry is used to load the appropriate ReaderWriter plugin for the filename extension, and this plugin then handles the request to read the specified file.

OSGDB_EXPORT osg::Image* osgDB::readImageFile ( const std::string &  filename,
const ReaderWriter::Options *  options 
)

Read an osg::Image from file. Return valid osg::Image on success, return NULL on failure. Use the Options object to control cache operations and file search paths in osgDB::Registry. The osgDB::Registry is used to load the appropriate ReaderWriter plugin for the filename extension, and this plugin then handles the request to read the specified file.

osg::Image* osgDB::readImageFile ( const std::string &  filename  )  [inline]

Read an osg::Image from file. Return valid osg::Image on success, return NULL on failure. The osgDB::Registry is used to load the appropriate ReaderWriter plugin for the filename extension, and this plugin then handles the request to read the specified file.

OSGDB_EXPORT osg::HeightField* osgDB::readHeightFieldFile ( const std::string &  filename,
const ReaderWriter::Options *  options 
)

Read an osg::HeightField from file. Return valid osg::HeightField on success, return NULL on failure. Use the Options object to control cache operations and file search paths in osgDB::Registry. The osgDB::Registry is used to load the appropriate ReaderWriter plugin for the filename extension, and this plugin then handles the request to read the specified file.

osg::HeightField* osgDB::readHeightFieldFile ( const std::string &  filename  )  [inline]

Read an osg::HeightField from file. Return valid osg::HeightField on success, return NULL on failure. The osgDB::Registry is used to load the appropriate ReaderWriter plugin for the filename extension, and this plugin then handles the request to read the specified file.

OSGDB_EXPORT osg::Node* osgDB::readNodeFile ( const std::string &  filename,
const ReaderWriter::Options *  options 
)

Read an osg::Node from file. Return valid osg::Node on success, return NULL on failure. Use the Options object to control cache operations and file search paths in osgDB::Registry. The osgDB::Registry is used to load the appropriate ReaderWriter plugin for the filename extension, and this plugin then handles the request to read the specified file.

osg::Node* osgDB::readNodeFile ( const std::string &  filename  )  [inline]

Read an osg::Node from file. Return valid osg::Node on success, return NULL on failure. The osgDB::Registry is used to load the appropriate ReaderWriter plugin for the filename extension, and this plugin then handles the request to read the specified file.

OSGDB_EXPORT osg::Node* osgDB::readNodeFiles ( std::vector< std::string > &  commandLine,
const ReaderWriter::Options *  options 
)

Read an osg::Node subgraph from files, creating a osg::Group to contain the nodes if more than one subgraph has been loaded. Use the Options object to control cache operations and file search paths in osgDB::Registry.

osg::Node* osgDB::readNodeFiles ( std::vector< std::string > &  commandLine  )  [inline]

Read an osg::Node subgraph from files, creating a osg::Group to contain the nodes if more than one subgraph has been loaded.

OSGDB_EXPORT osg::Node* osgDB::readNodeFiles ( osg::ArgumentParser parser,
const ReaderWriter::Options *  options 
)

Read an osg::Node subgraph from files, creating a osg::Group to contain the nodes if more than one subgraph has been loaded. Use the Options object to control cache operations and file search paths in osgDB::Registry.

osg::Node* osgDB::readNodeFiles ( osg::ArgumentParser parser  )  [inline]

Read an osg::Node subgraph from files, creating a osg::Group to contain the nodes if more than one subgraph has been loaded.

void osgDB::readCommandLine ( osg::ArgumentParser parser  )  [inline]

read the command line arguments.

OSGDB_EXPORT bool osgDB::writeObjectFile ( const osg::Object object,
const std::string &  filename 
)

Write an osg::Object to file. Return true on success, return false on failure. The osgDB::Registry is used to load the appropriate ReaderWriter plugin for the filename extension, and this plugin then handles the request to write the specified file.

OSGDB_EXPORT bool osgDB::writeImageFile ( const osg::Image image,
const std::string &  filename 
)

Write an osg::Image to file. Return true on success, return false on failure. The osgDB::Registry is used to load the appropriate ReaderWriter plugin for the filename extension, and this plugin then handles the request to write the specified file.

OSGDB_EXPORT bool osgDB::writeHeightFieldFile ( const osg::HeightField hf,
const std::string &  filename 
)

Write an osg::HeightField to file. Return true on success, return false on failure. The osgDB::Registry is used to load the appropriate ReaderWriter plugin for the filename extension, and this plugin then handles the request to write the specified file.

OSGDB_EXPORT bool osgDB::writeNodeFile ( const osg::Node node,
const std::string &  filename 
)

Write an osg::Node to file. Return true on success, return false on failure. The osgDB::Registry is used to load the appropriate ReaderWriter plugin for the filename extension, and this plugin then handles the request to write the specified file.


Generated on Sun Oct 1 13:17:09 2006 for openscenegraph by  doxygen 1.4.7