openscenegraph
|
Namespaces | |
namespace | FileOpResult |
Classes | |
class | Archive |
class | AuthenticationDetails |
class | AuthenticationMap |
class | FindFileCallback |
class | ReadFileCallback |
class | WriteFileCallback |
class | FileLocationCallback |
class | DatabasePager |
class | FileList |
class | DatabaseRevision |
class | DatabaseRevisions |
struct | ObjectGLenum |
class | ObjectProperty |
class | ObjectMark |
class | DotOsgWrapper |
class | DeprecatedDotOsgWrapperManager |
class | RegisterDotOsgWrapperProxy |
class | TemplateRegisterDotOsgWrapperProxy |
class | DynamicLibrary |
class | ExternalFileWriter |
class | FileCache |
class | fstream |
class | ifstream |
class | ofstream |
class | ImageOptions |
class | ImagePager |
class | ImageProcessor |
class | Field |
class | FieldReader |
class | FieldReaderIterator |
class | Input |
class | InputException |
class | InputStream |
class | BaseCompressor |
struct | FinishedObjectReadCallback |
class | ObjectWrapper |
class | ObjectWrapperManager |
class | RegisterWrapperProxy |
class | RegisterCompressorProxy |
class | Options |
class | Output |
class | OutputException |
class | OutputStream |
class | ParameterOutput |
class | ReaderWriterInfo |
class | ReaderWriter |
struct | basic_type_wrapper |
struct | type_wrapper |
class | Registry |
class | RegisterReaderWriterProxy |
class | RegisterImageProcessorProxy |
struct | PluginFunctionProxy |
class | IntLookup |
class | UserLookupTableProxy |
class | BaseSerializer |
class | UserSerializer |
class | TemplateSerializer |
class | PropByValSerializer |
class | PropByRefSerializer |
class | MatrixSerializer |
class | GLenumSerializer |
class | StringSerializer |
class | ObjectSerializer |
class | ImageSerializer |
class | EnumSerializer |
class | ListSerializer |
class | SharedStateManager |
class | OutputIterator |
class | InputIterator |
class | XmlNode |
Typedefs | |
typedef std::deque< std::string > | FilePathList |
typedef std::vector< std::string > | DirectoryContents |
typedef std::vector< std::string > | StringList |
typedef std::list< std::string > | FileNameList |
typedef std::list < osg::ref_ptr < ReaderWriterInfo > > | ReaderWriterInfoList |
Enumerations | |
enum | CaseSensitivity { CASE_SENSITIVE, CASE_INSENSITIVE } |
enum | FileType { FILE_NOT_FOUND, REGULAR_FILE, DIRECTORY } |
Functions | |
OSGDB_EXPORT Archive * | openArchive (const std::string &filename, ReaderWriter::ArchiveStatus status, unsigned int indexBlockSizeHint=4096) |
OSGDB_EXPORT Archive * | openArchive (const std::string &filename, ReaderWriter::ArchiveStatus status, unsigned int indexBlockSizeHint, Options *options) |
OSGDB_EXPORT std::string | convertUTF16toUTF8 (const wchar_t *source, unsigned sourceLength) |
OSGDB_EXPORT std::wstring | convertUTF8toUTF16 (const char *source, unsigned sourceLength) |
OSGDB_EXPORT std::string | convertUTF16toUTF8 (const std::wstring &s) |
OSGDB_EXPORT std::string | convertUTF16toUTF8 (const wchar_t *s) |
OSGDB_EXPORT std::wstring | convertUTF8toUTF16 (const std::string &s) |
OSGDB_EXPORT std::wstring | convertUTF8toUTF16 (const char *s) |
OSGDB_EXPORT std::string | convertStringFromCurrentCodePageToUTF8 (const char *source, unsigned sourceLength) |
OSGDB_EXPORT std::string | convertStringFromUTF8toCurrentCodePage (const char *source, unsigned sourceLength) |
OSGDB_EXPORT std::string | convertStringFromCurrentCodePageToUTF8 (const std::string &s) |
OSGDB_EXPORT std::string | convertStringFromCurrentCodePageToUTF8 (const char *s) |
OSGDB_EXPORT std::string | convertStringFromUTF8toCurrentCodePage (const std::string &s) |
OSGDB_EXPORT std::string | convertStringFromUTF8toCurrentCodePage (const char *s) |
OSGDB_EXPORT std::string | getFilePath (const std::string &filename) |
OSGDB_EXPORT std::string | getFileExtension (const std::string &filename) |
OSGDB_EXPORT std::string | getFileExtensionIncludingDot (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 | getNameLessAllExtensions (const std::string &fileName) |
OSGDB_EXPORT std::string | getStrippedName (const std::string &fileName) |
OSGDB_EXPORT std::string | getPathRelative (const std::string &from, const std::string &to) |
OSGDB_EXPORT std::string | getPathRoot (const std::string &path) |
OSGDB_EXPORT bool | isAbsolutePath (const std::string &path) |
OSGDB_EXPORT std::string | convertFileNameToWindowsStyle (const std::string &fileName) |
OSGDB_EXPORT std::string | convertFileNameToUnixStyle (const std::string &fileName) |
OSGDB_EXPORT std::string | convertToLowerCase (const std::string &fileName) |
OSGDB_EXPORT char | getNativePathSeparator () |
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 | getServerProtocol (const std::string &filename) |
OSGDB_EXPORT std::string | getServerAddress (const std::string &filename) |
OSGDB_EXPORT std::string | getServerFileName (const std::string &filename) |
OSGDB_EXPORT std::string | concatPaths (const std::string &left, const std::string &right) |
OSGDB_EXPORT std::string | getRealPath (const std::string &path) |
OSGDB_EXPORT void | getPathElements (const std::string &path, std::vector< std::string > &out_elements) |
OSGDB_EXPORT FILE * | fopen (const char *filename, const char *mode) |
OSGDB_EXPORT bool | makeDirectory (const std::string &directoryPath) |
OSGDB_EXPORT bool | makeDirectoryForFile (const std::string &filePath) |
OSGDB_EXPORT std::string | getCurrentWorkingDirectory (void) |
OSGDB_EXPORT bool | setCurrentWorkingDirectory (const std::string &newCurrentWorkingDirectory) |
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) |
OSGDB_EXPORT DirectoryContents | expandWildcardsInFilename (const std::string &filename) |
OSGDB_EXPORT FileOpResult::Value | copyFile (const std::string &source, const std::string &destination) |
void | setDataFilePathList (const FilePathList &filepath) |
void | setDataFilePathList (const std::string &paths) |
FilePathList & | getDataFilePathList () |
OSGDB_EXPORT std::string | findDataFile (const std::string &filename, CaseSensitivity caseSensitivity=CASE_SENSITIVE) |
OSGDB_EXPORT std::string | findDataFile (const std::string &filename, const Options *options, CaseSensitivity caseSensitivity=CASE_SENSITIVE) |
void | setLibraryFilePathList (const FilePathList &filepaths) |
void | setLibraryFilePathList (const std::string &paths) |
FilePathList & | getLibraryFilePathList () |
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) |
OSGDB_EXPORT void | split (const std::string &src, StringList &list, char separator=' ') |
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) |
FileNameList OSGDB_EXPORT | listAllAvailablePlugins () |
bool OSGDB_EXPORT | queryPlugin (const std::string &fileName, ReaderWriterInfoList &infoList) |
bool OSGDB_EXPORT | outputPluginDetails (std::ostream &out, const std::string &fileName) |
OSGDB_EXPORT osg::Object * | readObjectFile (const std::string &filename, const Options *options) |
osg::Object * | readObjectFile (const std::string &filename) |
OSGDB_EXPORT osg::Image * | readImageFile (const std::string &filename, const Options *options) |
osg::Image * | readImageFile (const std::string &filename) |
OSGDB_EXPORT osg::HeightField * | readHeightFieldFile (const std::string &filename, const Options *options) |
osg::HeightField * | readHeightFieldFile (const std::string &filename) |
OSGDB_EXPORT osg::Node * | readNodeFile (const std::string &filename, const Options *options) |
osg::Node * | readNodeFile (const std::string &filename) |
OSGDB_EXPORT osg::Node * | readNodeFiles (std::vector< std::string > &fileList, const Options *options) |
osg::Node * | readNodeFiles (std::vector< std::string > &fileList) |
OSGDB_EXPORT osg::Node * | readNodeFiles (osg::ArgumentParser &parser, const Options *options) |
osg::Node * | readNodeFiles (osg::ArgumentParser &parser) |
OSGDB_EXPORT osg::Shader * | readShaderFile (const std::string &filename, const Options *options) |
osg::Shader * | readShaderFile (const std::string &filename) |
osg::Shader * | readShaderFile (osg::Shader::Type type, const std::string &filename, const Options *options) |
osg::Shader * | readShaderFile (osg::Shader::Type type, const std::string &filename) |
OSGDB_EXPORT osg::ref_ptr < osg::Object > | readRefObjectFile (const std::string &filename, const Options *options) |
osg::ref_ptr< osg::Object > | readRefObjectFile (const std::string &filename) |
OSGDB_EXPORT osg::ref_ptr < osg::Image > | readRefImageFile (const std::string &filename, const Options *options) |
osg::ref_ptr< osg::Image > | readRefImageFile (const std::string &filename) |
OSGDB_EXPORT osg::ref_ptr < osg::HeightField > | readRefHeightFieldFile (const std::string &filename, const Options *options) |
osg::ref_ptr< osg::HeightField > | readRefHeightFieldFile (const std::string &filename) |
OSGDB_EXPORT osg::ref_ptr < osg::Node > | readRefNodeFile (const std::string &filename, const Options *options) |
osg::ref_ptr< osg::Node > | readRefNodeFile (const std::string &filename) |
OSGDB_EXPORT osg::ref_ptr < osg::Shader > | readRefShaderFile (const std::string &filename, const Options *options) |
osg::ref_ptr< osg::Shader > | readRefShaderFile (const std::string &filename) |
void | readCommandLine (osg::ArgumentParser &parser) |
OSGDB_EXPORT bool | writeObjectFile (const osg::Object &object, const std::string &filename, const Options *options) |
bool | writeObjectFile (const osg::Object &object, const std::string &filename) |
OSGDB_EXPORT bool | writeImageFile (const osg::Image &image, const std::string &filename, const Options *options) |
bool | writeImageFile (const osg::Image &image, const std::string &filename) |
OSGDB_EXPORT bool | writeHeightFieldFile (const osg::HeightField &hf, const std::string &filename, const Options *options) |
bool | writeHeightFieldFile (const osg::HeightField &hf, const std::string &filename) |
OSGDB_EXPORT bool | writeNodeFile (const osg::Node &node, const std::string &filename, const Options *options) |
bool | writeNodeFile (const osg::Node &node, const std::string &filename) |
OSGDB_EXPORT bool | writeShaderFile (const osg::Shader &shader, const std::string &filename, const Options *options) |
bool | writeShaderFile (const osg::Shader &shader, const std::string &filename) |
OSGDB_EXPORT XmlNode * | readXmlFile (const std::string &filename, const Options *options) |
XmlNode * | readXmlFile (const std::string &filename) |
OSGDB_EXPORT XmlNode * | readXmlStream (std::istream &fin) |
OSGDB_EXPORT std::string | trimEnclosingSpaces (const std::string &str) |
Variables | |
const unsigned int | PLUGIN_VERSION = 2 |
const int | BOOL_SIZE = 1 |
const int | CHAR_SIZE = 1 |
const int | SHORT_SIZE = 2 |
const int | INT_SIZE = 4 |
const int | LONG_SIZE = 4 |
const int | FLOAT_SIZE = 4 |
const int | DOUBLE_SIZE = 8 |
const int | GLENUM_SIZE = 4 |
const int | ID_BYTE_ARRAY = 0 |
const int | ID_UBYTE_ARRAY = 1 |
const int | ID_SHORT_ARRAY = 2 |
const int | ID_USHORT_ARRAY = 3 |
const int | ID_INT_ARRAY = 4 |
const int | ID_UINT_ARRAY = 5 |
const int | ID_FLOAT_ARRAY = 6 |
const int | ID_DOUBLE_ARRAY = 7 |
const int | ID_VEC2B_ARRAY = 8 |
const int | ID_VEC3B_ARRAY = 9 |
const int | ID_VEC4B_ARRAY = 10 |
const int | ID_VEC4UB_ARRAY = 11 |
const int | ID_VEC2S_ARRAY = 12 |
const int | ID_VEC3S_ARRAY = 13 |
const int | ID_VEC4S_ARRAY = 14 |
const int | ID_VEC2_ARRAY = 15 |
const int | ID_VEC3_ARRAY = 16 |
const int | ID_VEC4_ARRAY = 17 |
const int | ID_VEC2D_ARRAY = 18 |
const int | ID_VEC3D_ARRAY = 19 |
const int | ID_VEC4D_ARRAY = 20 |
const int | ID_DRAWARRAYS = 50 |
const int | ID_DRAWARRAY_LENGTH = 51 |
const int | ID_DRAWELEMENTS_UBYTE = 52 |
const int | ID_DRAWELEMENTS_USHORT = 53 |
const int | ID_DRAWELEMENTS_UINT = 54 |
const int | INDENT_VALUE = 2 |
const int | IMAGE_INLINE_DATA = 0 |
const int | IMAGE_INLINE_FILE = 1 |
const int | IMAGE_EXTERNAL = 2 |
const int | IMAGE_WRITE_OUT = 3 |
const char | UNIX_PATH_SEPARATOR = '/' |
const char | WINDOWS_PATH_SEPARATOR = '\\' |
The osgDB library provides support for reading and writing scene graphs, providing a plugin framework and file utility classes. The plugin framework in centered around the osgDB::Registry, and allows plugins which provide specific file format support to be dynamically loaded on demand.
typedef std::vector<std::string> osgDB::DirectoryContents |
simple list of names to represent a directory's contents.
typedef std::list<std::string> osgDB::FileNameList |
typedef std::deque< std::string > osgDB::FilePathList |
list of directories to search through which searching for files.
List of directories to search through which searching for files.
typedef std::list< osg::ref_ptr<ReaderWriterInfo> > osgDB::ReaderWriterInfoList |
typedef std::vector<std::string> osgDB::StringList |
enum osgDB::FileType |
OSGDB_EXPORT void osgDB::appendPlatformSpecificLibraryFilePaths | ( | FilePathList & | filepath | ) |
OSGDB_EXPORT void osgDB::appendPlatformSpecificResourceFilePaths | ( | FilePathList & | filepath | ) |
OSGDB_EXPORT std::string osgDB::concatPaths | ( | const std::string & | left, |
const std::string & | right | ||
) |
Concatenates two paths
OSGDB_EXPORT bool osgDB::containsServerAddress | ( | const std::string & | filename | ) |
OSGDB_EXPORT std::string osgDB::convertFileNameToNativeStyle | ( | const std::string & | fileName | ) |
Convert the path to contain only the current platform's path separators.
OSGDB_EXPORT std::string osgDB::convertFileNameToUnixStyle | ( | const std::string & | fileName | ) |
Converts back slashes (\) to forward slashes (/).
OSGDB_EXPORT std::string osgDB::convertFileNameToWindowsStyle | ( | const std::string & | fileName | ) |
Converts forward slashes (/) to back slashes (\).
OSGDB_EXPORT std::string osgDB::convertStringFromCurrentCodePageToUTF8 | ( | const std::string & | s | ) |
OSGDB_EXPORT std::string osgDB::convertStringFromCurrentCodePageToUTF8 | ( | const char * | source, |
unsigned | sourceLength | ||
) |
OSGDB_EXPORT std::string osgDB::convertStringFromCurrentCodePageToUTF8 | ( | const char * | s | ) |
OSGDB_EXPORT std::string osgDB::convertStringFromUTF8toCurrentCodePage | ( | const char * | source, |
unsigned | sourceLength | ||
) |
OSGDB_EXPORT std::string osgDB::convertStringFromUTF8toCurrentCodePage | ( | const std::string & | s | ) |
OSGDB_EXPORT std::string osgDB::convertStringFromUTF8toCurrentCodePage | ( | const char * | s | ) |
OSGDB_EXPORT void osgDB::convertStringPathIntoFilePathList | ( | const std::string & | paths, |
FilePathList & | filepath | ||
) |
convert a string containing a list of paths delimited either with ';' (Windows) or ':' (All other platforms) into FilePath representation.
OSGDB_EXPORT std::string osgDB::convertToLowerCase | ( | const std::string & | fileName | ) |
OSGDB_EXPORT std::string osgDB::convertUTF16toUTF8 | ( | const std::wstring & | s | ) |
OSGDB_EXPORT std::string osgDB::convertUTF16toUTF8 | ( | const wchar_t * | source, |
unsigned | sourceLength | ||
) |
OSGDB_EXPORT std::string osgDB::convertUTF16toUTF8 | ( | const wchar_t * | s | ) |
OSGDB_EXPORT std::wstring osgDB::convertUTF8toUTF16 | ( | const char * | s | ) |
OSGDB_EXPORT std::wstring osgDB::convertUTF8toUTF16 | ( | const char * | source, |
unsigned | sourceLength | ||
) |
OSGDB_EXPORT std::wstring osgDB::convertUTF8toUTF16 | ( | const std::string & | s | ) |
OSGDB_EXPORT FileOpResult::Value osgDB::copyFile | ( | const std::string & | source, |
const std::string & | destination | ||
) |
Copy a file to another location, overwriting if necessary. You must provide full path for both source and destination.
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 DirectoryContents osgDB::expandWildcardsInFilename | ( | const std::string & | filename | ) |
Return the list of filenames that match the given filename with wildcards. Will only expand '*', and will not expand wildcards in directory, only in filename part of the given filename. Return value will contain path+filename so that if ever the above limitation (expanding wildcards in directory) is fixed, client code will still work unchanged.
OSGDB_EXPORT bool osgDB::fileExists | ( | const std::string & | filename | ) |
return true if a file exists.
OSGDB_EXPORT FileType osgDB::fileType | ( | const std::string & | filename | ) |
return type of file.
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 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.
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 insensitive windows filenames.
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::findLibraryFile | ( | const std::string & | filename, |
CaseSensitivity | caseSensitivity = CASE_SENSITIVE |
||
) |
OSGDB_EXPORT FILE* osgDB::fopen | ( | const char * | filename, |
const char * | mode | ||
) |
Overload of the standard fopen function. If OSG_USE_UTF8_FILENAME is defined, filename will be expanded from UTF8 to UTF16 and _wfopen will be called.
OSGDB_EXPORT std::string osgDB::getCurrentWorkingDirectory | ( | void | ) |
Get current working directory.
FilePathList& osgDB::getDataFilePathList | ( | ) | [inline] |
References osgDB::Registry::getDataFilePathList(), and osgDB::Registry::instance().
OSGDB_EXPORT DirectoryContents osgDB::getDirectoryContents | ( | const std::string & | dirName | ) |
Return the contents of a directory. Return value will contain filenames only, not absolute paths. Returns an empty array on any error.
OSGDB_EXPORT std::string osgDB::getFileExtension | ( | const std::string & | filename | ) |
Gets the extension without dot (Ex: /a/b/c.Ext => Ext).
OSGDB_EXPORT std::string osgDB::getFileExtensionIncludingDot | ( | const std::string & | filename | ) |
Gets the extension including dot (Ex: /a/b/c.Ext => .Ext).
OSGDB_EXPORT std::string osgDB::getFilePath | ( | const std::string & | filename | ) |
Gets the parent path from full name (Ex: /a/b/c.Ext => /a/b).
FilePathList& osgDB::getLibraryFilePathList | ( | ) | [inline] |
References osgDB::Registry::getLibraryFilePathList(), and osgDB::Registry::instance().
OSGDB_EXPORT std::string osgDB::getLowerCaseFileExtension | ( | const std::string & | filename | ) |
Gets the lowercase extension without dot (Ex: /a/b/c.Ext => ext).
OSGDB_EXPORT std::string osgDB::getNameLessAllExtensions | ( | const std::string & | fileName | ) |
Gets file path without all extensions (Ex: /a/b/c.Ext => /a/b/c ; file.ext1.ext2 => file).
OSGDB_EXPORT std::string osgDB::getNameLessExtension | ( | const std::string & | fileName | ) |
Gets file path without last extension (Ex: /a/b/c.Ext => /a/b/c ; file.ext1.ext2 => file.ext1).
OSGDB_EXPORT char osgDB::getNativePathSeparator | ( | ) |
Get the path separator for the current platform.
OSGDB_EXPORT void osgDB::getPathElements | ( | const std::string & | path, |
std::vector< std::string > & | out_elements | ||
) |
Splits a path into elements between separators (including Windows' root, if any).
OSGDB_EXPORT std::string osgDB::getPathRelative | ( | const std::string & | from, |
const std::string & | to | ||
) |
If 'to' is in a subdirectory of 'from' then this function returns the subpath, otherwise it just returns the file name. The function does not automagically resolve paths as the system does, so be careful to give canonical paths. However, the function interprets slashes ('/') ans backslashes ('\') as they were equal.
OSGDB_EXPORT std::string osgDB::getPathRoot | ( | const std::string & | path | ) |
Gets root part of a path ("/" or "C:"), or an empty string if none found.
OSGDB_EXPORT std::string osgDB::getRealPath | ( | const std::string & | path | ) |
Removes .. and . dirs in a path
OSGDB_EXPORT std::string osgDB::getServerAddress | ( | const std::string & | filename | ) |
OSGDB_EXPORT std::string osgDB::getServerFileName | ( | const std::string & | filename | ) |
OSGDB_EXPORT std::string osgDB::getServerProtocol | ( | const std::string & | filename | ) |
OSGDB_EXPORT std::string osgDB::getSimpleFileName | ( | const std::string & | fileName | ) |
Gets file name with extension (Ex: /a/b/c.Ext => c.Ext).
OSGDB_EXPORT std::string osgDB::getStrippedName | ( | const std::string & | fileName | ) |
Gets file name without last extension (Ex: /a/b/c.Ext => c ; file.ext1.ext2 => file.ext1).
OSGDB_EXPORT bool osgDB::isAbsolutePath | ( | const std::string & | path | ) |
Tests if path is absolute, as !getPathRoot(path).empty().
OSGDB_EXPORT bool osgDB::isFileNameNativeStyle | ( | const std::string & | fileName | ) |
Check if the path contains only the current platform's path separators.
FileNameList OSGDB_EXPORT osgDB::listAllAvailablePlugins | ( | ) |
OSGDB_EXPORT bool osgDB::makeDirectory | ( | const std::string & | directoryPath | ) |
Make a new directory. Returns true if directory exists or was created.
OSGDB_EXPORT bool osgDB::makeDirectoryForFile | ( | const std::string & | filePath | ) |
Make a new directory for a given file.
OSGDB_EXPORT Archive* osgDB::openArchive | ( | const std::string & | filename, |
ReaderWriter::ArchiveStatus | status, | ||
unsigned int | indexBlockSizeHint, | ||
Options * | options | ||
) |
Open an archive for reading or writing.
OSGDB_EXPORT Archive* osgDB::openArchive | ( | const std::string & | filename, |
ReaderWriter::ArchiveStatus | status, | ||
unsigned int | indexBlockSizeHint = 4096 |
||
) |
Open an archive for reading or writing.
bool OSGDB_EXPORT osgDB::outputPluginDetails | ( | std::ostream & | out, |
const std::string & | fileName | ||
) |
bool OSGDB_EXPORT osgDB::queryPlugin | ( | const std::string & | fileName, |
ReaderWriterInfoList & | infoList | ||
) |
void osgDB::readCommandLine | ( | osg::ArgumentParser & | parser | ) | [inline] |
read the command line arguments.
References osgDB::Registry::instance(), and osgDB::Registry::readCommandLine().
Referenced by osg::CullSettings::CullSettings(), and osg::DisplaySettings::DisplaySettings().
OSGDB_EXPORT osg::HeightField* osgDB::readHeightFieldFile | ( | const std::string & | filename, |
const 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.
Referenced by readHeightFieldFile().
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.
References osgDB::Registry::instance(), and readHeightFieldFile().
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.
References osgDB::Registry::instance(), and readImageFile().
OSGDB_EXPORT osg::Image* osgDB::readImageFile | ( | const std::string & | filename, |
const 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.
Referenced by readImageFile().
OSGDB_EXPORT osg::Node* osgDB::readNodeFile | ( | const std::string & | filename, |
const 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.
Referenced by readNodeFile().
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.
References osgDB::Registry::instance(), and readNodeFile().
OSGDB_EXPORT osg::Node* osgDB::readNodeFiles | ( | std::vector< std::string > & | fileList, |
const 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. Does NOT ignore strings beginning with a dash '-' character.
Referenced by readNodeFiles().
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.
References osgDB::Registry::instance(), and readNodeFiles().
OSGDB_EXPORT osg::Node* osgDB::readNodeFiles | ( | osg::ArgumentParser & | parser, |
const 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 > & | fileList | ) | [inline] |
Read an osg::Node subgraph from files, creating a osg::Group to contain the nodes if more than one subgraph has been loaded.
References osgDB::Registry::instance(), and readNodeFiles().
OSGDB_EXPORT osg::Object* osgDB::readObjectFile | ( | const std::string & | filename, |
const 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.
Referenced by readObjectFile().
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.
References osgDB::Registry::instance(), and readObjectFile().
osg::ref_ptr<osg::HeightField> osgDB::readRefHeightFieldFile | ( | const std::string & | filename | ) | [inline] |
Read an osg::HeightField from file. Return an assigned osg::ref_ptr on success, return an osg::ref_ptr with a NULL pointer assigned to it 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.
References osgDB::Registry::instance(), and readRefHeightFieldFile().
OSGDB_EXPORT osg::ref_ptr<osg::HeightField> osgDB::readRefHeightFieldFile | ( | const std::string & | filename, |
const Options * | options | ||
) |
Read an osg::HeightField from file. Return an assigned osg::ref_ptr on success, return an osg::ref_ptr with a NULL pointer assigned to it 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.
Referenced by readRefHeightFieldFile().
OSGDB_EXPORT osg::ref_ptr<osg::Image> osgDB::readRefImageFile | ( | const std::string & | filename, |
const Options * | options | ||
) |
Read an osg::Image from file. Return an assigned osg::ref_ptr on success, return an osg::ref_ptr with a NULL pointer assigned to it 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.
Referenced by readRefImageFile().
osg::ref_ptr<osg::Image> osgDB::readRefImageFile | ( | const std::string & | filename | ) | [inline] |
Read an osg::Image from file. Return an assigned osg::ref_ptr on success, return an osg::ref_ptr with a NULL pointer assigned to it 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.
References osgDB::Registry::instance(), and readRefImageFile().
OSGDB_EXPORT osg::ref_ptr<osg::Node> osgDB::readRefNodeFile | ( | const std::string & | filename, |
const Options * | options | ||
) |
Read an osg::Node from file. Return an assigned osg::ref_ptr on success, return an osg::ref_ptr with a NULL pointer assigned to it 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.
Referenced by readRefNodeFile().
osg::ref_ptr<osg::Node> osgDB::readRefNodeFile | ( | const std::string & | filename | ) | [inline] |
Read an osg::Node from file. Return an assigned osg::ref_ptr on success, return an osg::ref_ptr with a NULL pointer assigned to it 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.
References osgDB::Registry::instance(), and readRefNodeFile().
osg::ref_ptr<osg::Object> osgDB::readRefObjectFile | ( | const std::string & | filename | ) | [inline] |
Read an osg::Object from file. Return an assigned osg::ref_ptr on success, return an osg::ref_ptr with a NULL pointer assigned to it 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.
References osgDB::Registry::instance(), and readRefObjectFile().
OSGDB_EXPORT osg::ref_ptr<osg::Object> osgDB::readRefObjectFile | ( | const std::string & | filename, |
const Options * | options | ||
) |
Read an osg::Object from file. Return an assigned osg::ref_ptr on success, return an osg::ref_ptr with a NULL pointer assigned to it 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.
Referenced by readRefObjectFile().
OSGDB_EXPORT osg::ref_ptr<osg::Shader> osgDB::readRefShaderFile | ( | const std::string & | filename, |
const Options * | options | ||
) |
Read an osg::Shader from file. Return an assigned osg::ref_ptr on success, return an osg::ref_ptr with a NULL pointer assigned to it 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.
Referenced by readRefShaderFile().
osg::ref_ptr<osg::Shader> osgDB::readRefShaderFile | ( | const std::string & | filename | ) | [inline] |
Read an osg::Shader from file. Return an assigned osg::ref_ptr on success, return an osg::ref_ptr with a NULL pointer assigned to it 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.
References osgDB::Registry::instance(), and readRefShaderFile().
osg::Shader* osgDB::readShaderFile | ( | const std::string & | filename | ) | [inline] |
Read an osg::Shader from file. Return valid osg::Shader 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.
References osgDB::Registry::instance(), and readShaderFile().
OSGDB_EXPORT osg::Shader* osgDB::readShaderFile | ( | const std::string & | filename, |
const Options * | options | ||
) |
Read an osg::Shader from file. Return valid osg::Shader 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.
Referenced by readShaderFile().
osg::Shader* osgDB::readShaderFile | ( | osg::Shader::Type | type, |
const std::string & | filename, | ||
const Options * | options | ||
) | [inline] |
Read an osg::Shader from file and set to specified shader type. Return valid osg::Shader 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.
References readShaderFile(), osg::Shader::setType(), and osg::Shader::UNDEFINED.
osg::Shader* osgDB::readShaderFile | ( | osg::Shader::Type | type, |
const std::string & | filename | ||
) | [inline] |
Read an osg::Shader from file and set to specified shader type Return valid osg::Shader 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.
References osgDB::Registry::instance(), and readShaderFile().
OSGDB_EXPORT XmlNode* osgDB::readXmlFile | ( | const std::string & | filename, |
const Options * | options | ||
) |
read an Xml file, find the file in Options DataFilePathList.
Referenced by readXmlFile().
XmlNode* osgDB::readXmlFile | ( | const std::string & | filename | ) | [inline] |
read an Xml file, find the file in osgDB::Registry's eaderWriter::Options DataFilePathList.
References osgDB::Registry::instance(), and readXmlFile().
OSGDB_EXPORT XmlNode* osgDB::readXmlStream | ( | std::istream & | fin | ) |
read an Xml from from an istream.
OSGDB_EXPORT bool osgDB::setCurrentWorkingDirectory | ( | const std::string & | newCurrentWorkingDirectory | ) |
Set current working directory.
void osgDB::setDataFilePathList | ( | const std::string & | paths | ) | [inline] |
References osgDB::Registry::instance(), and osgDB::Registry::setDataFilePathList().
void osgDB::setDataFilePathList | ( | const FilePathList & | filepath | ) | [inline] |
References osgDB::Registry::instance(), and osgDB::Registry::setDataFilePathList().
void osgDB::setLibraryFilePathList | ( | const std::string & | paths | ) | [inline] |
References osgDB::Registry::instance(), and osgDB::Registry::setLibraryFilePathList().
void osgDB::setLibraryFilePathList | ( | const FilePathList & | filepaths | ) | [inline] |
References osgDB::Registry::instance(), and osgDB::Registry::setLibraryFilePathList().
OSGDB_EXPORT void osgDB::split | ( | const std::string & | src, |
StringList & | list, | ||
char | separator = ' ' |
||
) |
OSGDB_EXPORT std::string osgDB::trimEnclosingSpaces | ( | const std::string & | str | ) |
Referenced by osgDB::XmlNode::getTrimmedContents().
void osgDB::writeArray | ( | Output & | fw, |
Iterator | first, | ||
Iterator | last, | ||
int | noItemsPerLine = 0 |
||
) |
References osgDB::Output::getNumIndicesPerLine(), osgDB::Output::indent(), osgDB::Output::moveIn(), and osgDB::Output::moveOut().
Referenced by osgDB::OutputStream::operator<<().
void osgDB::writeArrayAsInts | ( | Output & | fw, |
Iterator | first, | ||
Iterator | last, | ||
int | noItemsPerLine = 0 |
||
) |
OSGDB_EXPORT bool osgDB::writeHeightFieldFile | ( | const osg::HeightField & | hf, |
const std::string & | filename, | ||
const Options * | options | ||
) |
Write an osg::HeightField to file. Return true on success, return false 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 write the specified file.
Referenced by writeHeightFieldFile().
bool osgDB::writeHeightFieldFile | ( | const osg::HeightField & | hf, |
const std::string & | filename | ||
) | [inline] |
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.
References osgDB::Registry::instance(), and writeHeightFieldFile().
bool osgDB::writeImageFile | ( | const osg::Image & | image, |
const std::string & | filename | ||
) | [inline] |
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.
References osgDB::Registry::instance(), and writeImageFile().
OSGDB_EXPORT bool osgDB::writeImageFile | ( | const osg::Image & | image, |
const std::string & | filename, | ||
const Options * | options | ||
) |
Write an osg::Image to file. Return true on success, return false 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 write the specified file.
Referenced by writeImageFile().
OSGDB_EXPORT bool osgDB::writeNodeFile | ( | const osg::Node & | node, |
const std::string & | filename, | ||
const Options * | options | ||
) |
Write an osg::Node to file. Return true on success, return false 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 write the specified file.
Referenced by writeNodeFile().
bool osgDB::writeNodeFile | ( | const osg::Node & | node, |
const std::string & | filename | ||
) | [inline] |
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.
References osgDB::Registry::instance(), and writeNodeFile().
bool osgDB::writeObjectFile | ( | const osg::Object & | object, |
const std::string & | filename | ||
) | [inline] |
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.
References osgDB::Registry::instance(), and writeObjectFile().
OSGDB_EXPORT bool osgDB::writeObjectFile | ( | const osg::Object & | object, |
const std::string & | filename, | ||
const Options * | options | ||
) |
Write an osg::Object to file. Return true on success, return false 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 write the specified file.
Referenced by writeObjectFile().
bool osgDB::writeShaderFile | ( | const osg::Shader & | shader, |
const std::string & | filename | ||
) | [inline] |
Write an osg::Shader 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.
References osgDB::Registry::instance(), and writeShaderFile().
OSGDB_EXPORT bool osgDB::writeShaderFile | ( | const osg::Shader & | shader, |
const std::string & | filename, | ||
const Options * | options | ||
) |
Write an osg::Shader to file. Return true on success, return false 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 write the specified file.
Referenced by writeShaderFile().
const int osgDB::BOOL_SIZE = 1 |
const int osgDB::CHAR_SIZE = 1 |
const int osgDB::DOUBLE_SIZE = 8 |
const int osgDB::FLOAT_SIZE = 4 |
const int osgDB::GLENUM_SIZE = 4 |
const int osgDB::ID_BYTE_ARRAY = 0 |
const int osgDB::ID_DOUBLE_ARRAY = 7 |
const int osgDB::ID_DRAWARRAY_LENGTH = 51 |
const int osgDB::ID_DRAWARRAYS = 50 |
const int osgDB::ID_DRAWELEMENTS_UBYTE = 52 |
const int osgDB::ID_DRAWELEMENTS_UINT = 54 |
const int osgDB::ID_DRAWELEMENTS_USHORT = 53 |
const int osgDB::ID_FLOAT_ARRAY = 6 |
const int osgDB::ID_INT_ARRAY = 4 |
const int osgDB::ID_SHORT_ARRAY = 2 |
const int osgDB::ID_UBYTE_ARRAY = 1 |
const int osgDB::ID_UINT_ARRAY = 5 |
const int osgDB::ID_USHORT_ARRAY = 3 |
const int osgDB::ID_VEC2_ARRAY = 15 |
const int osgDB::ID_VEC2B_ARRAY = 8 |
const int osgDB::ID_VEC2D_ARRAY = 18 |
const int osgDB::ID_VEC2S_ARRAY = 12 |
const int osgDB::ID_VEC3_ARRAY = 16 |
const int osgDB::ID_VEC3B_ARRAY = 9 |
const int osgDB::ID_VEC3D_ARRAY = 19 |
const int osgDB::ID_VEC3S_ARRAY = 13 |
const int osgDB::ID_VEC4_ARRAY = 17 |
const int osgDB::ID_VEC4B_ARRAY = 10 |
const int osgDB::ID_VEC4D_ARRAY = 20 |
const int osgDB::ID_VEC4S_ARRAY = 14 |
const int osgDB::ID_VEC4UB_ARRAY = 11 |
const int osgDB::IMAGE_EXTERNAL = 2 |
const int osgDB::IMAGE_INLINE_DATA = 0 |
const int osgDB::IMAGE_INLINE_FILE = 1 |
const int osgDB::IMAGE_WRITE_OUT = 3 |
const int osgDB::INDENT_VALUE = 2 |
const int osgDB::INT_SIZE = 4 |
const int osgDB::LONG_SIZE = 4 |
const unsigned int osgDB::PLUGIN_VERSION = 2 |
const int osgDB::SHORT_SIZE = 2 |
const char osgDB::UNIX_PATH_SEPARATOR = '/' |
const char osgDB::WINDOWS_PATH_SEPARATOR = '\\' |