Added new statc prototype() and create() methods to CullVisitor and DatabasePager to allow overriding of the default implementations
This commit is contained in:
@@ -45,6 +45,19 @@ class OSGDB_EXPORT DatabasePager : public osg::NodeVisitor::DatabaseRequestHandl
|
||||
|
||||
DatabasePager();
|
||||
|
||||
DatabasePager(const DatabasePager& rhs);
|
||||
|
||||
/** Create a shallow copy on the DatabasePager.*/
|
||||
virtual DatabasePager* clone() const { return new DatabasePager(*this); }
|
||||
|
||||
/** get the prototype singleton used by DatabasePager::create().*/
|
||||
static osg::ref_ptr<DatabasePager>& prototype();
|
||||
|
||||
/** create a DatabasePager by cloning DatabasePager::prototype().*/
|
||||
static DatabasePager* create();
|
||||
|
||||
|
||||
|
||||
/** Add a request to load a node file to end the the database request list.*/
|
||||
virtual void requestNodeFile(const std::string& fileName,osg::Group* group,
|
||||
float priority, const osg::FrameStamp* framestamp);
|
||||
|
||||
@@ -53,9 +53,18 @@ class OSGUTIL_EXPORT CullVisitor : public osg::NodeVisitor, public osg::CullStac
|
||||
|
||||
|
||||
CullVisitor();
|
||||
virtual ~CullVisitor();
|
||||
|
||||
/// Copy constructor that does a shallow copy.
|
||||
CullVisitor(const CullVisitor&);
|
||||
|
||||
virtual CullVisitor* cloneType() const { return new CullVisitor(); }
|
||||
/** Create a shallow copy on the CullVisitor.*/
|
||||
virtual CullVisitor* clone() const { return new CullVisitor(*this); }
|
||||
|
||||
/** get the prototype singleton used by CullVisitor::create().*/
|
||||
static osg::ref_ptr<CullVisitor>& prototype();
|
||||
|
||||
/** create a CullVisitor by cloning CullVisitor::prototype().*/
|
||||
static CullVisitor* create();
|
||||
|
||||
virtual void reset();
|
||||
|
||||
@@ -258,6 +267,8 @@ class OSGUTIL_EXPORT CullVisitor : public osg::NodeVisitor, public osg::CullStac
|
||||
|
||||
protected:
|
||||
|
||||
virtual ~CullVisitor();
|
||||
|
||||
/** Prevent unwanted copy operator.*/
|
||||
CullVisitor& operator = (const CullVisitor&) { return *this; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user