|
发表于 2016-6-22 15:58:16
|
显示全部楼层
你看看TilePagedLOD::traverse()
- case(osg::NodeVisitor::TRAVERSE_ACTIVE_CHILDREN):
- {
- float required_range = 0;
- if (_rangeMode==DISTANCE_FROM_EYE_POINT)
- {
- required_range = nv.getDistanceToViewPoint(getCenter(),true);
- }
- else
- {
- osg::CullStack* cullStack = dynamic_cast<osg::CullStack*>(&nv);
- if (cullStack && cullStack->getLODScale()>0.0f)
- {
- [color=Red]required_range = cullStack->clampedPixelSize(getBound()) / cullStack->getLODScale();[/color]
- }
- else
复制代码 |
|