Fixed bug in osg::LOD::addChild() which was forcing all ranges to be identical
values.
This commit is contained in:
@@ -42,9 +42,16 @@ void LOD::traverse(NodeVisitor& nv)
|
||||
|
||||
bool LOD::addChild( Node *child )
|
||||
{
|
||||
float maxRange = 0.0f;
|
||||
if (!_rangeList.empty()) maxRange=_rangeList.back().second;
|
||||
return addChild(child,maxRange,maxRange);
|
||||
if (Group::addChild(child))
|
||||
{
|
||||
float maxRange = 0.0f;
|
||||
if (!_rangeList.empty()) maxRange=_rangeList.back().second;
|
||||
|
||||
if (_children.size()>_rangeList.size()) _rangeList.resize(_children.size(),MinMaxPair(maxRange,maxRange));
|
||||
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool LOD::addChild(Node *child, float min, float max)
|
||||
|
||||
Reference in New Issue
Block a user