void LocalGeometryNode::onTileAdded(const TileKey& key, osg::Node* graph, TerrainCallbackContext& context) { bool needsClamp; // This was faster, but less precise and resulted in a lot of unnecessary clamp attempts: //if ( _boundingPT.contains(patch->getBound()) ) // Does the tile key's polytope intersect the world bounds or this object? // (taking getParent(0) gives the world-tranformed bounds vs. local bounds) if (key.valid()) { osg::Polytope tope; key.getExtent().createPolytope(tope); needsClamp = tope.contains(this->getParent(0)->getBound()); } else { // with no key, must clamp no matter what needsClamp = true; } if (needsClamp) { clamp(graph, context.getTerrain()); } }
void ImageOverlay::onTileAdded(const TileKey& key, osg::Node* tile, TerrainCallbackContext& context) { if ( tile == 0L || _boundingPolytope.contains(tile->getBound()) ) { clamp( context.getTerrain(), tile ); } }
void ImageOverlay::onTileAdded(const TileKey& key, osg::Node* graph, TerrainCallbackContext& context) { if ( graph == 0L || !key.valid() || _boundingPolytope.contains(graph->getBound()) ) { clamp( graph, context.getTerrain() ); } }
// This will be called by AnnotationNode when a new terrain tile comes in. void FeatureNode::onTileAdded(const TileKey& key, osg::Node* tile, TerrainCallbackContext& context) { if ( !tile || _featurePolytope.contains( tile->getBound() ) ) { clamp( context.getTerrain(), tile ); } }
void onTileAdded( const TileKey& key, osg::Node* tile, TerrainCallbackContext& context ) { _dragger->reclamp( key, tile, context.getTerrain() ); }
void onTileAdded( const TileKey& key, osg::Node* tile, TerrainCallbackContext& context ) { Dragger* dragger = static_cast<Dragger*>(context.getClientData()); dragger->reclamp( key, tile, context.getTerrain() ); }
void onTileAdded( const TileKey& key, osg::Node* tile, TerrainCallbackContext& context ) { AnnotationNode* anno = static_cast<AnnotationNode*>(context.getClientData()); anno->reclamp( key, tile, context.getTerrain() ); }