Added support for pixel based LOD's and set the default priority scale to 1.0
This commit is contained in:
parent
796b4cbe8d
commit
5adff5c15e
@ -13,12 +13,13 @@
|
|||||||
|
|
||||||
#include <osg/PagedLOD>
|
#include <osg/PagedLOD>
|
||||||
#include <osg/CullStack>
|
#include <osg/CullStack>
|
||||||
|
#include <osg/Notify>
|
||||||
|
|
||||||
using namespace osg;
|
using namespace osg;
|
||||||
|
|
||||||
PagedLOD::PerRangeData::PerRangeData():
|
PagedLOD::PerRangeData::PerRangeData():
|
||||||
_priorityOffset(0.0f),
|
_priorityOffset(0.0f),
|
||||||
_priorityScale(0.0f),
|
_priorityScale(1.0f),
|
||||||
_timeStamp(0.0f) {}
|
_timeStamp(0.0f) {}
|
||||||
|
|
||||||
PagedLOD::PerRangeData::PerRangeData(const PerRangeData& prd):
|
PagedLOD::PerRangeData::PerRangeData(const PerRangeData& prd):
|
||||||
@ -175,7 +176,7 @@ void PagedLOD::traverse(NodeVisitor& nv)
|
|||||||
|
|
||||||
// modify the priority according to the child's priority offset and scale.
|
// modify the priority according to the child's priority offset and scale.
|
||||||
priority = _perRangeDataList[numChildren]._priorityOffset + priority * _perRangeDataList[numChildren]._priorityScale;
|
priority = _perRangeDataList[numChildren]._priorityOffset + priority * _perRangeDataList[numChildren]._priorityScale;
|
||||||
|
|
||||||
if (_databasePath.empty())
|
if (_databasePath.empty())
|
||||||
{
|
{
|
||||||
nv.getDatabaseRequestHandler()->requestNodeFile(_perRangeDataList[numChildren]._filename,this,priority,nv.getFrameStamp());
|
nv.getDatabaseRequestHandler()->requestNodeFile(_perRangeDataList[numChildren]._filename,this,priority,nv.getFrameStamp());
|
||||||
|
Loading…
Reference in New Issue
Block a user