Improvements to the DatabasePager and PagedLOD class adding support for

deleting expuired children in the database thread.
This commit is contained in:
Robert Osfield
2003-07-09 14:55:39 +00:00
parent dcbaf59753
commit 5aa47a77c2
9 changed files with 140 additions and 50 deletions

View File

@@ -19,6 +19,8 @@
namespace osg {
typedef std::vector< ref_ptr<Node> > NodeList;
/** General group node which maintains a list of children.
Children are reference counted. This allows children to be shared
with memory management handled automatically via osg::Referenced.
@@ -27,7 +29,6 @@ class SG_EXPORT Group : public Node
{
public :
typedef std::vector<ref_ptr<Node> > ChildList;
Group();
@@ -89,7 +90,7 @@ class SG_EXPORT Group : public Node
inline bool containsNode( const Node* node ) const
{
for (ChildList::const_iterator itr=_children.begin();
for (NodeList::const_iterator itr=_children.begin();
itr!=_children.end();
++itr)
{
@@ -116,7 +117,7 @@ class SG_EXPORT Group : public Node
virtual bool computeBound() const;
ChildList _children;
NodeList _children;
};

View File

@@ -74,7 +74,10 @@ class SG_EXPORT PagedLOD : public LOD
/** return the list of time stamps.*/
inline const TimeStampList& getTimeStampList() const { return _timeStampList; }
void removeExpiredChildren(double expiryTime);
/** Remove the children from the PagedLOD which haven't be visited since specified expiry time.
The removed children are added the removeChildren list passed into the method,
this allows the children to be deleted later at the callers discression.*/
void removeExpiredChildren(double expiryTime,NodeList& removedChildren);
protected :