Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

osgDB Namespace Reference


Compounds

class  DotOsgWrapper
 Wrapper class for specifying read and write functions for extending the .osg file format. More...

class  DynamicLibrary
 DynamicLibrary - encapsulates the loading and unloading of dynamic libraries, typically used for loading ReaderWriter plug-ins. More...

class  Field
class  FieldReader
class  FieldReaderIterator
class  Input
 Class for managing the reading of ASCII .osg files. More...

class  Options
class  Output
 ofstream wrapper class for adding support for indenting. More...

class  PushAndPopDataPath
 Convinience class for pushing a path on construction, and popping the path and destruction. More...

class  ReaderWriter
 pure virtual base class for reading and writing of non native formats. More...

class  ReadResult
class  WriteResult
class  RegisterDotOsgWrapperProxy
 Proxy class for automatic registration of DotOsgWrappers with the Registry. More...

class  RegisterReaderWriterProxy
 Proxy class for automatic registration of reader/writers with the Registry. More...

class  Registry
 Registry is a singleton factory which stores the reader/writers which are linked in at runtime for reading non-native file formats. More...


Typedefs

typedef std::vector< std::string > DirectoryContents
 simple list of names to represent a directory's contents.

typedef std::deque< std::string > FilePathList
 list of directories to search through which searching for files.


Functions

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 getStrippedName (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 fileExists (const std::string &filename)
 return true if a file exisits.

OSGDB_EXPORT std::string findFileInPath (const std::string &filename, const FilePathList &filePath)
 find specified file in specified file path.

OSGDB_EXPORT std::string findFileInDirectory (const std::string &fileName, const std::string &dirName, bool caseInsensitive=false)
 return the directory/filename of a file if its is contained within specified directory.

OSGDB_EXPORT DirectoryContents getDirectoryContents (const std::string &dirName)
 return the contents of a directory.

void setDataFilePathList (const FilePathList &filepath)
void setDataFilePathList (const std::string &paths)
FilePathListgetDataFilePathList ()
OSGDB_EXPORT std::string findDataFile (const std::string &filename)
void setLibraryFilePathList (const FilePathList &filepaths)
void setLibraryFilePathList (const std::string &paths)
FilePathListgetLibraryFilePathList ()
OSGDB_EXPORT std::string findLibraryFile (const std::string &filename)
template<class T> bool writeArrayBlock (Output &fw, T *start, T *finish)
OSGDB_EXPORT osg::ObjectreadObjectFile (const std::string &filename)
 Read an osg::Object from file.

OSGDB_EXPORT osg::ImagereadImageFile (const std::string &filename)
 Read an osg::Image from file.

OSGDB_EXPORT osg::NodereadNodeFile (const std::string &filename)
 Read an osg::Node from file.

OSGDB_EXPORT osg::NodereadNodeFiles (std::vector< std::string > &commandLine)
 Read an osg::Node subgraph from files, creating a osg::Group to contain the nodes if more than one subgraph has been loaded.

void readCommandLine (std::vector< std::string > &commandLine)
 read the command line string list into the osgDB::Registry(), removing any matched control sequences.

OSGDB_EXPORT bool writeObjectFile (const osg::Object &object, const std::string &filename)
 Write an osg::Object to file.

OSGDB_EXPORT bool writeImageFile (const osg::Image &image, const std::string &filename)
 Write an osg::Image to file.

OSGDB_EXPORT bool writeNodeFile (const osg::Node &node, const std::string &filename)
 Write an osg::Node to file.


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.


Function Documentation

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

OSGDB_EXPORT bool equalCaseInsensitive const std::string &    lhs,
const std::string &    rhs
 

OSGDB_EXPORT bool fileExists const std::string &    filename
 

return true if a file exisits.

OSGDB_EXPORT std::string findDataFile const std::string &    filename
 

OSGDB_EXPORT std::string findFileInDirectory const std::string &    fileName,
const std::string &    dirName,
bool    caseInsensitive = false
 

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 std::string findFileInPath const std::string &    filename,
const FilePathList   filePath
 

find specified file in specified file path.

OSGDB_EXPORT std::string findLibraryFile const std::string &    filename
 

FilePathList& getDataFilePathList   [inline]
 

OSGDB_EXPORT DirectoryContents getDirectoryContents const std::string &    dirName
 

return the contents of a directory.

returns an empty array on any error.

OSGDB_EXPORT std::string getFileExtension const std::string &    filename
 

OSGDB_EXPORT std::string getFilePath const std::string &    filename
 

FilePathList& getLibraryFilePathList   [inline]
 

OSGDB_EXPORT std::string getLowerCaseFileExtension const std::string &    filename
 

OSGDB_EXPORT std::string getSimpleFileName const std::string &    fileName
 

OSGDB_EXPORT std::string getStrippedName const std::string &    fileName
 

void readCommandLine std::vector< std::string > &    commandLine [inline]
 

read the command line string list into the osgDB::Registry(), removing any matched control sequences.

OSGDB_EXPORT osg::Image* readImageFile const std::string &    filename
 

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::Node* readNodeFile const std::string &    filename
 

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* readNodeFiles std::vector< std::string > &    commandLine
 

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::Object* readObjectFile const std::string &    filename
 

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.

void setDataFilePathList const std::string &    paths [inline]
 

void setDataFilePathList const FilePathList   filepath [inline]
 

void setLibraryFilePathList const std::string &    paths [inline]
 

void setLibraryFilePathList const FilePathList   filepaths [inline]
 

template<class T>
bool writeArrayBlock Output   fw,
T *    start,
T *    finish
 

OSGDB_EXPORT bool 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 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.

OSGDB_EXPORT bool 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.


Generated at Wed Sep 18 13:55:47 2002 for the Open Scene Graph by doxygen 1.2.16.