void StreamingTerrainNode::updateTraversal( osg::NodeVisitor& nv ) { // this stamp keeps track of when requests are dispatched. If a request's stamp gets too // old, it is considered "expired" and subject to cancelation int stamp = nv.getFrameStamp()->getFrameNumber(); // update the frame stamp on the task services. This is necessary to support // automatic request cancelation for image requests. { ScopedLock<Mutex> lock( _taskServiceMutex ); for (TaskServiceMap::iterator i = _taskServices.begin(); i != _taskServices.end(); ++i) { i->second->setStamp( stamp ); } } // next, go through the live tiles and process update-traversal requests. This // requires a read-lock on the master tiles table. { Threading::ScopedReadLock tileTableReadLock( _tilesMutex ); for( TileTable::const_iterator i = _tiles.begin(); i != _tiles.end(); ++i ) { StreamingTile* tile = static_cast<StreamingTile*>( i->second.get() ); // update the neighbor list for each tile. refreshFamily( _update_mapf.getMapInfo(), tile->getKey(), tile->getFamily(), true ); tile->servicePendingElevationRequests( _update_mapf, stamp, true ); tile->serviceCompletedRequests( _update_mapf, true ); } } }