Added the ability to turn off the external paging in of PagedLOD children.

This commit is contained in:
Robert Osfield
2009-07-16 10:13:41 +00:00
parent 5eceffc06b
commit 5496e91f87
5 changed files with 35 additions and 2 deletions

View File

@@ -54,6 +54,7 @@ PagedLOD::PagedLOD()
_centerMode = USER_DEFINED_CENTER;
_radius = -1;
_numChildrenThatCannotBeExpired = 0;
_disableExternalChildrenPaging = false;
}
PagedLOD::PagedLOD(const PagedLOD& plod,const CopyOp& copyop):
@@ -62,6 +63,7 @@ PagedLOD::PagedLOD(const PagedLOD& plod,const CopyOp& copyop):
_databasePath(plod._databasePath),
_frameNumberOfLastTraversal(plod._frameNumberOfLastTraversal),
_numChildrenThatCannotBeExpired(plod._numChildrenThatCannotBeExpired),
_disableExternalChildrenPaging(plod._disableExternalChildrenPaging),
_perRangeDataList(plod._perRangeDataList)
{
}
@@ -198,7 +200,9 @@ void PagedLOD::traverse(NodeVisitor& nv)
}
// now request the loading of the next unloaded child.
if (nv.getDatabaseRequestHandler() && numChildren<_perRangeDataList.size())
if (!_disableExternalChildrenPaging &&
nv.getDatabaseRequestHandler() &&
numChildren<_perRangeDataList.size())
{
// compute priority from where abouts in the required range the distance falls.
float priority = (_rangeList[numChildren].second-required_range)/(_rangeList[numChildren].second-_rangeList[numChildren].first);