本文整理汇总了C++中TileNode::isOutOfDate方法的典型用法代码示例。如果您正苦于以下问题:C++ TileNode::isOutOfDate方法的具体用法?C++ TileNode::isOutOfDate怎么用?C++ TileNode::isOutOfDate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TileNode
的用法示例。
在下文中一共展示了TileNode::isOutOfDate方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: exclusive
void
TilePagedLOD::traverse(osg::NodeVisitor& nv)
{
// Only traverse the TileNode if our neighbors (the other members of
// our group of four) are ready as well.
if ( _children.size() > 0 )
{
_children[0]->setNodeMask( _familyReady ? ~0 : 0 );
// find our tile node:
TileNode* tilenode = dynamic_cast<TileGroup*>(_children[0].get()) ?
static_cast<TileGroup*>(_children[0].get())->getTileNode() :
static_cast<TileNode*>(_children[0].get());
// Check whether the TileNode is marked dirty. If so, install a new pager request
// to reload and replace the TileNode.
if (nv.getVisitorType() == nv.CULL_VISITOR &&
this->getNumFileNames() < 2 &&
tilenode->isOutOfDate() )
{
// lock keeps multiple CullVisitors from doing the same thing
Threading::ScopedMutexLock exclusive( _updateMutex );
if ( this->getNumFileNames() < 2 ) // double-check pattern
{
//OE_WARN << LC << "Queuing request for replacement: " << _container->getTileNode()->getKey().str() << std::endl;
this->setFileName( 1, Stringify() << _prefix << ".osgearth_engine_mp_standalone_tile" );
this->setRange( 1, 0, FLT_MAX );
}
}
}
osg::PagedLOD::traverse( nv );
}