Added the ability to turn off the external paging in of PagedLOD children.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user