Changed the DatabasePager so that it bypasses the Registry::readNode() method and calls

readNodeImplementation() directly to avoid calling the KdTreeBuilder.   

Updated wrappers.
This commit is contained in:
Robert Osfield
2008-07-06 18:27:10 +00:00
parent 3965fe357b
commit c4e8d6ee42
14 changed files with 214 additions and 115 deletions

View File

@@ -110,21 +110,6 @@ BEGIN_OBJECT_REFLECTOR(osg::Geometry)
__C5_Array_P1__getVertexArray,
"",
"");
I_Method1(void, setVertexIndices, IN, osg::IndexArray *, array,
Properties::NON_VIRTUAL,
__void__setVertexIndices__IndexArray_P1,
"",
"");
I_Method0(osg::IndexArray *, getVertexIndices,
Properties::NON_VIRTUAL,
__IndexArray_P1__getVertexIndices,
"",
"");
I_Method0(const osg::IndexArray *, getVertexIndices,
Properties::NON_VIRTUAL,
__C5_IndexArray_P1__getVertexIndices,
"",
"");
I_Method1(void, setVertexData, IN, const osg::Geometry::ArrayData &, arrayData,
Properties::NON_VIRTUAL,
__void__setVertexData__C5_ArrayData_R1,
@@ -165,21 +150,6 @@ BEGIN_OBJECT_REFLECTOR(osg::Geometry)
__C5_Array_P1__getNormalArray,
"",
"");
I_Method1(void, setNormalIndices, IN, osg::IndexArray *, array,
Properties::NON_VIRTUAL,
__void__setNormalIndices__IndexArray_P1,
"",
"");
I_Method0(osg::IndexArray *, getNormalIndices,
Properties::NON_VIRTUAL,
__IndexArray_P1__getNormalIndices,
"",
"");
I_Method0(const osg::IndexArray *, getNormalIndices,
Properties::NON_VIRTUAL,
__C5_IndexArray_P1__getNormalIndices,
"",
"");
I_Method1(void, setNormalData, IN, const osg::Geometry::ArrayData &, arrayData,
Properties::NON_VIRTUAL,
__void__setNormalData__C5_ArrayData_R1,
@@ -220,21 +190,6 @@ BEGIN_OBJECT_REFLECTOR(osg::Geometry)
__C5_Array_P1__getColorArray,
"",
"");
I_Method1(void, setColorIndices, IN, osg::IndexArray *, array,
Properties::NON_VIRTUAL,
__void__setColorIndices__IndexArray_P1,
"",
"");
I_Method0(osg::IndexArray *, getColorIndices,
Properties::NON_VIRTUAL,
__IndexArray_P1__getColorIndices,
"",
"");
I_Method0(const osg::IndexArray *, getColorIndices,
Properties::NON_VIRTUAL,
__C5_IndexArray_P1__getColorIndices,
"",
"");
I_Method1(void, setColorData, IN, const osg::Geometry::ArrayData &, arrayData,
Properties::NON_VIRTUAL,
__void__setColorData__C5_ArrayData_R1,
@@ -275,21 +230,6 @@ BEGIN_OBJECT_REFLECTOR(osg::Geometry)
__C5_Array_P1__getSecondaryColorArray,
"",
"");
I_Method1(void, setSecondaryColorIndices, IN, osg::IndexArray *, array,
Properties::NON_VIRTUAL,
__void__setSecondaryColorIndices__IndexArray_P1,
"",
"");
I_Method0(osg::IndexArray *, getSecondaryColorIndices,
Properties::NON_VIRTUAL,
__IndexArray_P1__getSecondaryColorIndices,
"",
"");
I_Method0(const osg::IndexArray *, getSecondaryColorIndices,
Properties::NON_VIRTUAL,
__C5_IndexArray_P1__getSecondaryColorIndices,
"",
"");
I_Method1(void, setSecondaryColorData, IN, const osg::Geometry::ArrayData &, arrayData,
Properties::NON_VIRTUAL,
__void__setSecondaryColorData__C5_ArrayData_R1,
@@ -330,21 +270,6 @@ BEGIN_OBJECT_REFLECTOR(osg::Geometry)
__C5_Array_P1__getFogCoordArray,
"",
"");
I_Method1(void, setFogCoordIndices, IN, osg::IndexArray *, array,
Properties::NON_VIRTUAL,
__void__setFogCoordIndices__IndexArray_P1,
"",
"");
I_Method0(osg::IndexArray *, getFogCoordIndices,
Properties::NON_VIRTUAL,
__IndexArray_P1__getFogCoordIndices,
"",
"");
I_Method0(const osg::IndexArray *, getFogCoordIndices,
Properties::NON_VIRTUAL,
__C5_IndexArray_P1__getFogCoordIndices,
"",
"");
I_Method1(void, setFogCoordData, IN, const osg::Geometry::ArrayData &, arrayData,
Properties::NON_VIRTUAL,
__void__setFogCoordData__C5_ArrayData_R1,
@@ -375,21 +300,6 @@ BEGIN_OBJECT_REFLECTOR(osg::Geometry)
__C5_Array_P1__getTexCoordArray__unsigned_int,
"",
"");
I_Method2(void, setTexCoordIndices, IN, unsigned int, unit, IN, osg::IndexArray *, x,
Properties::NON_VIRTUAL,
__void__setTexCoordIndices__unsigned_int__IndexArray_P1,
"",
"");
I_Method1(osg::IndexArray *, getTexCoordIndices, IN, unsigned int, unit,
Properties::NON_VIRTUAL,
__IndexArray_P1__getTexCoordIndices__unsigned_int,
"",
"");
I_Method1(const osg::IndexArray *, getTexCoordIndices, IN, unsigned int, unit,
Properties::NON_VIRTUAL,
__C5_IndexArray_P1__getTexCoordIndices__unsigned_int,
"",
"");
I_Method2(void, setTexCoordData, IN, unsigned int, index, IN, const osg::Geometry::ArrayData &, arrayData,
Properties::NON_VIRTUAL,
__void__setTexCoordData__unsigned_int__C5_ArrayData_R1,
@@ -435,21 +345,6 @@ BEGIN_OBJECT_REFLECTOR(osg::Geometry)
__C5_Array_P1__getVertexAttribArray__unsigned_int,
"",
"");
I_Method2(void, setVertexAttribIndices, IN, unsigned int, index, IN, osg::IndexArray *, array,
Properties::NON_VIRTUAL,
__void__setVertexAttribIndices__unsigned_int__IndexArray_P1,
"",
"");
I_Method1(osg::IndexArray *, getVertexAttribIndices, IN, unsigned int, index,
Properties::NON_VIRTUAL,
__IndexArray_P1__getVertexAttribIndices__unsigned_int,
"",
"");
I_Method1(const osg::IndexArray *, getVertexAttribIndices, IN, unsigned int, index,
Properties::NON_VIRTUAL,
__C5_IndexArray_P1__getVertexAttribIndices__unsigned_int,
"",
"");
I_Method2(void, setVertexAttribBinding, IN, unsigned int, index, IN, osg::Geometry::AttributeBinding, ab,
Properties::NON_VIRTUAL,
__void__setVertexAttribBinding__unsigned_int__AttributeBinding,
@@ -555,6 +450,111 @@ BEGIN_OBJECT_REFLECTOR(osg::Geometry)
__unsigned_int__getPrimitiveSetIndex__C5_PrimitiveSet_P1,
"Get the index number of a primitive set, return a value between 0 and getNumPrimitiveSet()-1 if found, if not found then return getNumPrimitiveSet(). ",
"When checking for a valid find value use if ((value=geometry->getPrimitiveSetIndex(primitive))!=geometry.getNumPrimitiveSet()) ");
I_Method1(void, setVertexIndices, IN, osg::IndexArray *, array,
Properties::NON_VIRTUAL,
__void__setVertexIndices__IndexArray_P1,
"deprecated - forces OpenGL slow path, just kept for backwards compatibility. ",
"");
I_Method0(osg::IndexArray *, getVertexIndices,
Properties::NON_VIRTUAL,
__IndexArray_P1__getVertexIndices,
"",
"");
I_Method0(const osg::IndexArray *, getVertexIndices,
Properties::NON_VIRTUAL,
__C5_IndexArray_P1__getVertexIndices,
"",
"");
I_Method1(void, setNormalIndices, IN, osg::IndexArray *, array,
Properties::NON_VIRTUAL,
__void__setNormalIndices__IndexArray_P1,
"deprecated - forces OpenGL slow path, just kept for backwards compatibility. ",
"");
I_Method0(osg::IndexArray *, getNormalIndices,
Properties::NON_VIRTUAL,
__IndexArray_P1__getNormalIndices,
"",
"");
I_Method0(const osg::IndexArray *, getNormalIndices,
Properties::NON_VIRTUAL,
__C5_IndexArray_P1__getNormalIndices,
"",
"");
I_Method1(void, setColorIndices, IN, osg::IndexArray *, array,
Properties::NON_VIRTUAL,
__void__setColorIndices__IndexArray_P1,
"deprecated - forces OpenGL slow path, just kept for backwards compatibility. ",
"");
I_Method0(osg::IndexArray *, getColorIndices,
Properties::NON_VIRTUAL,
__IndexArray_P1__getColorIndices,
"",
"");
I_Method0(const osg::IndexArray *, getColorIndices,
Properties::NON_VIRTUAL,
__C5_IndexArray_P1__getColorIndices,
"",
"");
I_Method1(void, setSecondaryColorIndices, IN, osg::IndexArray *, array,
Properties::NON_VIRTUAL,
__void__setSecondaryColorIndices__IndexArray_P1,
"deprecated - forces OpenGL slow path, just kept for backwards compatibility. ",
"");
I_Method0(osg::IndexArray *, getSecondaryColorIndices,
Properties::NON_VIRTUAL,
__IndexArray_P1__getSecondaryColorIndices,
"",
"");
I_Method0(const osg::IndexArray *, getSecondaryColorIndices,
Properties::NON_VIRTUAL,
__C5_IndexArray_P1__getSecondaryColorIndices,
"",
"");
I_Method1(void, setFogCoordIndices, IN, osg::IndexArray *, array,
Properties::NON_VIRTUAL,
__void__setFogCoordIndices__IndexArray_P1,
"deprecated - forces OpenGL slow path, just kept for backwards compatibility. ",
"");
I_Method0(osg::IndexArray *, getFogCoordIndices,
Properties::NON_VIRTUAL,
__IndexArray_P1__getFogCoordIndices,
"",
"");
I_Method0(const osg::IndexArray *, getFogCoordIndices,
Properties::NON_VIRTUAL,
__C5_IndexArray_P1__getFogCoordIndices,
"",
"");
I_Method2(void, setTexCoordIndices, IN, unsigned int, unit, IN, osg::IndexArray *, x,
Properties::NON_VIRTUAL,
__void__setTexCoordIndices__unsigned_int__IndexArray_P1,
"deprecated - forces OpenGL slow path, just kept for backwards compatibility. ",
"");
I_Method1(osg::IndexArray *, getTexCoordIndices, IN, unsigned int, unit,
Properties::NON_VIRTUAL,
__IndexArray_P1__getTexCoordIndices__unsigned_int,
"",
"");
I_Method1(const osg::IndexArray *, getTexCoordIndices, IN, unsigned int, unit,
Properties::NON_VIRTUAL,
__C5_IndexArray_P1__getTexCoordIndices__unsigned_int,
"",
"");
I_Method2(void, setVertexAttribIndices, IN, unsigned int, index, IN, osg::IndexArray *, array,
Properties::NON_VIRTUAL,
__void__setVertexAttribIndices__unsigned_int__IndexArray_P1,
"deprecated - forces OpenGL slow path, just kept for backwards compatibility. ",
"");
I_Method1(osg::IndexArray *, getVertexAttribIndices, IN, unsigned int, index,
Properties::NON_VIRTUAL,
__IndexArray_P1__getVertexAttribIndices__unsigned_int,
"",
"");
I_Method1(const osg::IndexArray *, getVertexAttribIndices, IN, unsigned int, index,
Properties::NON_VIRTUAL,
__C5_IndexArray_P1__getVertexAttribIndices__unsigned_int,
"",
"");
I_Method1(void, setUseVertexBufferObjects, IN, bool, flag,
Properties::VIRTUAL,
__void__setUseVertexBufferObjects__bool,

View File

@@ -449,6 +449,11 @@ BEGIN_OBJECT_REFLECTOR(osgDB::DatabasePager::DatabaseThread)
__void__run,
"Thread's run method. ",
"Must be implemented by derived classes. This is where the action happens. ");
I_Method2(osg::ref_ptr< osg::Node >, dpReadRefNodeFile, IN, const std::string &, fileName, IN, const osgDB::ReaderWriter::Options *, options,
Properties::NON_VIRTUAL,
__osg_ref_ptrT1_osg_Node___dpReadRefNodeFile__C5_std_string_R1__C5_ReaderWriter_Options_P1,
"",
"");
I_SimpleProperty(bool, Done,
__bool__getDone,
__void__setDone__bool);

View File

@@ -198,6 +198,13 @@ BEGIN_ENUM_REFLECTOR(osgDB::ReaderWriter::Options::CacheHintOptions)
I_EnumLabel(osgDB::ReaderWriter::Options::CACHE_ALL);
END_REFLECTOR
BEGIN_ENUM_REFLECTOR(osgDB::ReaderWriter::Options::BuildKdTreesHint)
I_DeclaringFile("osgDB/ReaderWriter");
I_EnumLabel(osgDB::ReaderWriter::Options::NO_PREFERENCE);
I_EnumLabel(osgDB::ReaderWriter::Options::DO_NOT_BUILD_KDTREES);
I_EnumLabel(osgDB::ReaderWriter::Options::BUILD_KDTREES);
END_REFLECTOR
BEGIN_OBJECT_REFLECTOR(osgDB::ReaderWriter::Options)
I_DeclaringFile("osgDB/ReaderWriter");
I_BaseType(osg::Object);
@@ -273,6 +280,16 @@ BEGIN_OBJECT_REFLECTOR(osgDB::ReaderWriter::Options)
__CacheHintOptions__getObjectCacheHint,
"Get whether the Registry::ObjectCache should be used by default. ",
"");
I_Method1(void, setBuildKdTreesHint, IN, osgDB::ReaderWriter::Options::BuildKdTreesHint, hint,
Properties::NON_VIRTUAL,
__void__setBuildKdTreesHint__BuildKdTreesHint,
"Set whether the KdTrees should be built for geometry in the loader model. ",
"");
I_Method0(osgDB::ReaderWriter::Options::BuildKdTreesHint, getBuildKdTreesHint,
Properties::NON_VIRTUAL,
__BuildKdTreesHint__getBuildKdTreesHint,
"Get whether the KdTrees should be built for geometry in the loader model. ",
"");
I_Method2(void, setPluginData, IN, const std::string &, s, IN, void *, v,
Properties::NON_VIRTUAL,
__void__setPluginData__C5_std_string_R1__void_P1,
@@ -293,6 +310,9 @@ BEGIN_OBJECT_REFLECTOR(osgDB::ReaderWriter::Options)
__void__removePluginData__C5_std_string_R1,
"Remove a value from the PluginData. ",
"");
I_SimpleProperty(osgDB::ReaderWriter::Options::BuildKdTreesHint, BuildKdTreesHint,
__BuildKdTreesHint__getBuildKdTreesHint,
__void__setBuildKdTreesHint__BuildKdTreesHint);
I_SimpleProperty(const std::string &, DatabasePath,
0,
__void__setDatabasePath__C5_std_string_R1);

View File

@@ -13,6 +13,7 @@
#include <osg/ArgumentParser>
#include <osg/Drawable>
#include <osg/Image>
#include <osg/KdTree>
#include <osg/Node>
#include <osg/Object>
#include <osg/Shader>
@@ -330,6 +331,31 @@ BEGIN_OBJECT_REFLECTOR(osgDB::Registry)
__ReaderWriter_WriteResult__writeShaderImplementation__C5_osg_Shader_R1__C5_std_string_R1__C5_ReaderWriter_Options_P1,
"",
"");
I_Method2(void, buildKdTreeIfRequired, IN, osgDB::ReaderWriter::ReadResult &, result, IN, const osgDB::ReaderWriter::Options *, options,
Properties::NON_VIRTUAL,
__void__buildKdTreeIfRequired__ReaderWriter_ReadResult_R1__C5_ReaderWriter_Options_P1,
"",
"");
I_Method1(void, setBuildKdTreesHint, IN, osgDB::ReaderWriter::Options::BuildKdTreesHint, hint,
Properties::NON_VIRTUAL,
__void__setBuildKdTreesHint__ReaderWriter_Options_BuildKdTreesHint,
"",
"");
I_Method0(osgDB::ReaderWriter::Options::BuildKdTreesHint, getBuildKdTreesHint,
Properties::NON_VIRTUAL,
__ReaderWriter_Options_BuildKdTreesHint__getBuildKdTreesHint,
"",
"");
I_Method1(void, setKdTreeBuilder, IN, osg::KdTreeBuilder *, builder,
Properties::NON_VIRTUAL,
__void__setKdTreeBuilder__osg_KdTreeBuilder_P1,
"",
"");
I_Method0(osg::KdTreeBuilder *, getKdTreeBuilder,
Properties::NON_VIRTUAL,
__osg_KdTreeBuilder_P1__getKdTreeBuilder,
"",
"");
I_Method1(void, setCreateNodeFromImage, IN, bool, flag,
Properties::NON_VIRTUAL,
__void__setCreateNodeFromImage__bool,
@@ -528,6 +554,9 @@ BEGIN_OBJECT_REFLECTOR(osgDB::Registry)
__ReaderWriter_ReadResult__readImplementation__C5_ReadFunctor_R1__bool,
"",
"");
I_SimpleProperty(osgDB::ReaderWriter::Options::BuildKdTreesHint, BuildKdTreesHint,
__ReaderWriter_Options_BuildKdTreesHint__getBuildKdTreesHint,
__void__setBuildKdTreesHint__ReaderWriter_Options_BuildKdTreesHint);
I_SimpleProperty(bool, CreateNodeFromImage,
__bool__getCreateNodeFromImage,
__void__setCreateNodeFromImage__bool);
@@ -537,6 +566,9 @@ BEGIN_OBJECT_REFLECTOR(osgDB::Registry)
I_SimpleProperty(osgDB::DatabasePager *, DatabasePager,
__DatabasePager_P1__getDatabasePager,
__void__setDatabasePager__DatabasePager_P1);
I_SimpleProperty(osg::KdTreeBuilder *, KdTreeBuilder,
__osg_KdTreeBuilder_P1__getKdTreeBuilder,
__void__setKdTreeBuilder__osg_KdTreeBuilder_P1);
I_SimpleProperty(const osgDB::FilePathList &, LibraryFilePathList,
__C5_FilePathList_R1__getLibraryFilePathList,
__void__setLibraryFilePathList__C5_FilePathList_R1);

View File

@@ -126,6 +126,12 @@ BEGIN_OBJECT_REFLECTOR(osgGA::DriveManipulator)
__double__getHeight,
"",
"");
I_ProtectedMethod4(bool, intersect, IN, const osg::Vec3d &, start, IN, const osg::Vec3d &, end, IN, osg::Vec3d &, intersection, IN, osg::Vec3d &, normal,
Properties::NON_VIRTUAL,
Properties::CONST,
__bool__intersect__C5_osg_Vec3d_R1__C5_osg_Vec3d_R1__osg_Vec3d_R1__osg_Vec3d_R1,
"",
"");
I_ProtectedMethod0(void, flushMouseEventStack,
Properties::NON_VIRTUAL,
Properties::NON_CONST,

View File

@@ -118,6 +118,12 @@ BEGIN_OBJECT_REFLECTOR(osgGA::TerrainManipulator)
__void__getUsage__osg_ApplicationUsage_R1,
"Get the keyboard and mouse usage of this manipulator. ",
"");
I_ProtectedMethod3(bool, intersect, IN, const osg::Vec3d &, start, IN, const osg::Vec3d &, end, IN, osg::Vec3d &, intersection,
Properties::NON_VIRTUAL,
Properties::CONST,
__bool__intersect__C5_osg_Vec3d_R1__C5_osg_Vec3d_R1__osg_Vec3d_R1,
"",
"");
I_ProtectedMethod0(void, flushMouseEventStack,
Properties::NON_VIRTUAL,
Properties::NON_CONST,

View File

@@ -187,5 +187,3 @@ END_REFLECTOR
STD_SET_REFLECTOR(std::multiset< osgUtil::LineSegmentIntersector::Intersection >)
STD_VECTOR_REFLECTOR(std::vector< double >)