Moved Registry::ReadFileCallback + WriteFileCallback, and osgDB::ReaderWriter::Options into their own separate Options file and into the osgDB namespace.
Introduced a new callback osgDB::FindFileCallback that overrides the default behavior of findDataFile/findLibraryFile. Introduced support for assigning ReaderWriter::Options directory to PagedLOD. Introduced new osgDB::FileLocationCallback for assistancing the DatabasePager to know when a file is hosted on a local or remote file system.
This commit is contained in:
@@ -419,11 +419,11 @@ BEGIN_ABSTRACT_OBJECT_REFLECTOR(osg::NodeVisitor::DatabaseRequestHandler)
|
||||
I_Constructor0(____DatabaseRequestHandler,
|
||||
"",
|
||||
"");
|
||||
I_Method5(void, requestNodeFile, IN, const std::string &, fileName, IN, osg::Group *, group, IN, float, priority, IN, const osg::FrameStamp *, framestamp, IN, osg::ref_ptr< osg::Referenced > &, databaseRequest,
|
||||
Properties::PURE_VIRTUAL,
|
||||
__void__requestNodeFile__C5_std_string_R1__osg_Group_P1__float__C5_FrameStamp_P1__osg_ref_ptrT1_osg_Referenced__R1,
|
||||
"",
|
||||
"");
|
||||
I_MethodWithDefaults6(void, requestNodeFile, IN, const std::string &, fileName, , IN, osg::Group *, group, , IN, float, priority, , IN, const osg::FrameStamp *, framestamp, , IN, osg::ref_ptr< osg::Referenced > &, databaseRequest, , IN, const osg::Referenced *, options, 0,
|
||||
Properties::PURE_VIRTUAL,
|
||||
__void__requestNodeFile__C5_std_string_R1__osg_Group_P1__float__C5_FrameStamp_P1__osg_ref_ptrT1_osg_Referenced__R1__C5_osg_Referenced_P1,
|
||||
"",
|
||||
"");
|
||||
END_REFLECTOR
|
||||
|
||||
BEGIN_ABSTRACT_OBJECT_REFLECTOR(osg::NodeVisitor::ImageRequestHandler)
|
||||
|
||||
@@ -93,6 +93,21 @@ BEGIN_OBJECT_REFLECTOR(osg::PagedLOD)
|
||||
__bool__removeChildren__unsigned_int__unsigned_int,
|
||||
"Remove children from Group. ",
|
||||
"Note, must be override by subclasses of Group which add per child attributes. ");
|
||||
I_Method1(void, setDatabaseOptions, IN, osg::Referenced *, options,
|
||||
Properties::NON_VIRTUAL,
|
||||
__void__setDatabaseOptions__osg_Referenced_P1,
|
||||
"Set the optional database osgDB::Options object to use when loaded children. ",
|
||||
"");
|
||||
I_Method0(osg::Referenced *, getDatabaseOptions,
|
||||
Properties::NON_VIRTUAL,
|
||||
__osg_Referenced_P1__getDatabaseOptions,
|
||||
"Get the optional database osgDB::Options object used when loaded children. ",
|
||||
"");
|
||||
I_Method0(const osg::Referenced *, getDatabaseOptions,
|
||||
Properties::NON_VIRTUAL,
|
||||
__C5_osg_Referenced_P1__getDatabaseOptions,
|
||||
"Get the optional database osgDB::Options object used when loaded children. ",
|
||||
"");
|
||||
I_Method1(void, setDatabasePath, IN, const std::string &, path,
|
||||
Properties::NON_VIRTUAL,
|
||||
__void__setDatabasePath__C5_std_string_R1,
|
||||
@@ -224,6 +239,9 @@ BEGIN_OBJECT_REFLECTOR(osg::PagedLOD)
|
||||
__void__expandPerRangeDataTo__unsigned_int,
|
||||
"",
|
||||
"");
|
||||
I_SimpleProperty(osg::Referenced *, DatabaseOptions,
|
||||
__osg_Referenced_P1__getDatabaseOptions,
|
||||
__void__setDatabaseOptions__osg_Referenced_P1);
|
||||
I_SimpleProperty(const std::string &, DatabasePath,
|
||||
__C5_std_string_R1__getDatabasePath,
|
||||
__void__setDatabasePath__C5_std_string_R1);
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
#include <osg/Referenced>
|
||||
#include <osg/State>
|
||||
#include <osgDB/DatabasePager>
|
||||
#include <osgDB/Options>
|
||||
|
||||
// Must undefine IN and OUT macros defined in Windows headers
|
||||
#ifdef IN
|
||||
@@ -69,16 +68,11 @@ BEGIN_OBJECT_REFLECTOR(osgDB::DatabasePager)
|
||||
__DatabasePager_P1__clone,
|
||||
"Create a shallow copy on the DatabasePager. ",
|
||||
"");
|
||||
I_Method5(void, requestNodeFile, IN, const std::string &, fileName, IN, osg::Group *, group, IN, float, priority, IN, const osg::FrameStamp *, framestamp, IN, osg::ref_ptr< osg::Referenced > &, databaseRequest,
|
||||
I_Method6(void, requestNodeFile, IN, const std::string &, fileName, IN, osg::Group *, group, IN, float, priority, IN, const osg::FrameStamp *, framestamp, IN, osg::ref_ptr< osg::Referenced > &, databaseRequest, IN, const osg::Referenced *, options,
|
||||
Properties::VIRTUAL,
|
||||
__void__requestNodeFile__C5_std_string_R1__osg_Group_P1__float__C5_osg_FrameStamp_P1__osg_ref_ptrT1_osg_Referenced__R1,
|
||||
__void__requestNodeFile__C5_std_string_R1__osg_Group_P1__float__C5_osg_FrameStamp_P1__osg_ref_ptrT1_osg_Referenced__R1__C5_osg_Referenced_P1,
|
||||
"Add a request to load a node file to end the the database request list. ",
|
||||
"");
|
||||
I_Method6(void, requestNodeFile, IN, const std::string &, fileName, IN, osg::Group *, group, IN, float, priority, IN, const osg::FrameStamp *, framestamp, IN, osg::ref_ptr< osg::Referenced > &, databaseRequest, IN, osgDB::Options *, loadOptions,
|
||||
Properties::VIRTUAL,
|
||||
__void__requestNodeFile__C5_std_string_R1__osg_Group_P1__float__C5_osg_FrameStamp_P1__osg_ref_ptrT1_osg_Referenced__R1__Options_P1,
|
||||
"",
|
||||
"");
|
||||
I_Method1(int, setSchedulePriority, IN, OpenThreads::Thread::ThreadPriority, priority,
|
||||
Properties::NON_VIRTUAL,
|
||||
__int__setSchedulePriority__OpenThreads_Thread_ThreadPriority,
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
#include <osg/Shader>
|
||||
#include <osg/Shape>
|
||||
#include <osgDB/AuthenticationMap>
|
||||
#include <osgDB/FileCache>
|
||||
#include <osgDB/Options>
|
||||
#include <osgDB/ReaderWriter>
|
||||
|
||||
@@ -28,6 +29,30 @@
|
||||
#undef OUT
|
||||
#endif
|
||||
|
||||
BEGIN_ENUM_REFLECTOR(osgDB::FileLocationCallback::Location)
|
||||
I_DeclaringFile("osgDB/Options");
|
||||
I_EnumLabel(osgDB::FileLocationCallback::LOCAL_FILE);
|
||||
I_EnumLabel(osgDB::FileLocationCallback::REMOTE_FILE);
|
||||
END_REFLECTOR
|
||||
|
||||
BEGIN_ABSTRACT_OBJECT_REFLECTOR(osgDB::FileLocationCallback)
|
||||
I_DeclaringFile("osgDB/Options");
|
||||
I_VirtualBaseType(osg::Referenced);
|
||||
I_Constructor0(____FileLocationCallback,
|
||||
"",
|
||||
"");
|
||||
I_Method2(osgDB::FileLocationCallback::Location, fileLocation, IN, const std::string &, filename, IN, const osgDB::Options *, options,
|
||||
Properties::PURE_VIRTUAL,
|
||||
__Location__fileLocation__C5_std_string_R1__C5_Options_P1,
|
||||
"",
|
||||
"");
|
||||
I_Method0(bool, useFileCache,
|
||||
Properties::PURE_VIRTUAL,
|
||||
__bool__useFileCache,
|
||||
"",
|
||||
"");
|
||||
END_REFLECTOR
|
||||
|
||||
BEGIN_OBJECT_REFLECTOR(osgDB::FindFileCallback)
|
||||
I_DeclaringFile("osgDB/Options");
|
||||
I_VirtualBaseType(osg::Referenced);
|
||||
@@ -223,13 +248,33 @@ BEGIN_OBJECT_REFLECTOR(osgDB::Options)
|
||||
I_Method1(void, setWriteFileCallback, IN, osgDB::WriteFileCallback *, cb,
|
||||
Properties::NON_VIRTUAL,
|
||||
__void__setWriteFileCallback__WriteFileCallback_P1,
|
||||
"Set the Registry callback to use in place of the default writeFile calls. ",
|
||||
"Set the callback to use in place of the default writeFile calls. ",
|
||||
"");
|
||||
I_Method0(osgDB::WriteFileCallback *, getWriteFileCallback,
|
||||
Properties::NON_VIRTUAL,
|
||||
__WriteFileCallback_P1__getWriteFileCallback,
|
||||
"Get the const writeFile callback. ",
|
||||
"");
|
||||
I_Method1(void, setFileLocationCallback, IN, osgDB::FileLocationCallback *, cb,
|
||||
Properties::NON_VIRTUAL,
|
||||
__void__setFileLocationCallback__FileLocationCallback_P1,
|
||||
"Set the callback to use inform the DatabasePager whether a file is located on local or remote file system. ",
|
||||
"");
|
||||
I_Method0(osgDB::FileLocationCallback *, getFileLocationCallback,
|
||||
Properties::NON_VIRTUAL,
|
||||
__FileLocationCallback_P1__getFileLocationCallback,
|
||||
"Get the callback to use inform the DatabasePager whether a file is located on local or remote file system. ",
|
||||
"");
|
||||
I_Method1(void, setFileCache, IN, osgDB::FileCache *, fileCache,
|
||||
Properties::NON_VIRTUAL,
|
||||
__void__setFileCache__FileCache_P1,
|
||||
"Set the FileCache that is used to manage local storage of files downloaded from the internet. ",
|
||||
"");
|
||||
I_Method0(osgDB::FileCache *, getFileCache,
|
||||
Properties::NON_VIRTUAL,
|
||||
__FileCache_P1__getFileCache,
|
||||
"Get the FileCache that is used to manage local storage of files downloaded from the internet. ",
|
||||
"");
|
||||
I_SimpleProperty(osgDB::AuthenticationMap *, AuthenticationMap,
|
||||
0,
|
||||
__void__setAuthenticationMap__AuthenticationMap_P1);
|
||||
@@ -242,6 +287,12 @@ BEGIN_OBJECT_REFLECTOR(osgDB::Options)
|
||||
I_SimpleProperty(osgDB::FilePathList &, DatabasePathList,
|
||||
__FilePathList_R1__getDatabasePathList,
|
||||
0);
|
||||
I_SimpleProperty(osgDB::FileCache *, FileCache,
|
||||
__FileCache_P1__getFileCache,
|
||||
__void__setFileCache__FileCache_P1);
|
||||
I_SimpleProperty(osgDB::FileLocationCallback *, FileLocationCallback,
|
||||
__FileLocationCallback_P1__getFileLocationCallback,
|
||||
__void__setFileLocationCallback__FileLocationCallback_P1);
|
||||
I_SimpleProperty(osgDB::FindFileCallback *, FindFileCallback,
|
||||
__FindFileCallback_P1__getFindFileCallback,
|
||||
__void__setFindFileCallback__FindFileCallback_P1);
|
||||
|
||||
@@ -85,6 +85,8 @@ TYPE_NAME_ALIAS(class osgDB::ReadFileCallback, osgDB::Registry::ReadFileCallback
|
||||
|
||||
TYPE_NAME_ALIAS(class osgDB::WriteFileCallback, osgDB::Registry::WriteFileCallback)
|
||||
|
||||
TYPE_NAME_ALIAS(class osgDB::FileLocationCallback, osgDB::Registry::FileLocationCallback)
|
||||
|
||||
BEGIN_OBJECT_REFLECTOR(osgDB::Registry)
|
||||
I_DeclaringFile("osgDB/Registry");
|
||||
I_BaseType(osg::Referenced);
|
||||
@@ -412,6 +414,16 @@ BEGIN_OBJECT_REFLECTOR(osgDB::Registry)
|
||||
__void___buildKdTreeIfRequired__ReaderWriter_ReadResult_R1__C5_Options_P1,
|
||||
"",
|
||||
"");
|
||||
I_Method1(void, setFileLocationCallback, IN, osgDB::Registry::FileLocationCallback *, cb,
|
||||
Properties::NON_VIRTUAL,
|
||||
__void__setFileLocationCallback__FileLocationCallback_P1,
|
||||
"Set the callback to use inform the DatabasePager whether a file is located on local or remote file system. ",
|
||||
"");
|
||||
I_Method0(osgDB::Registry::FileLocationCallback *, getFileLocationCallback,
|
||||
Properties::NON_VIRTUAL,
|
||||
__FileLocationCallback_P1__getFileLocationCallback,
|
||||
"Get the callback to use inform the DatabasePager whether a file is located on local or remote file system. ",
|
||||
"");
|
||||
I_Method1(void, setBuildKdTreesHint, IN, osgDB::Options::BuildKdTreesHint, hint,
|
||||
Properties::NON_VIRTUAL,
|
||||
__void__setBuildKdTreesHint__Options_BuildKdTreesHint,
|
||||
@@ -666,6 +678,9 @@ BEGIN_OBJECT_REFLECTOR(osgDB::Registry)
|
||||
I_SimpleProperty(osgDB::FileCache *, FileCache,
|
||||
__FileCache_P1__getFileCache,
|
||||
__void__setFileCache__FileCache_P1);
|
||||
I_SimpleProperty(osgDB::Registry::FileLocationCallback *, FileLocationCallback,
|
||||
__FileLocationCallback_P1__getFileLocationCallback,
|
||||
__void__setFileLocationCallback__FileLocationCallback_P1);
|
||||
I_SimpleProperty(osgDB::Registry::FindFileCallback *, FindFileCallback,
|
||||
__FindFileCallback_P1__getFindFileCallback,
|
||||
__void__setFindFileCallback__FindFileCallback_P1);
|
||||
|
||||
Reference in New Issue
Block a user