本文整理汇总了C++中MapModelChange::getElevationLayer方法的典型用法代码示例。如果您正苦于以下问题:C++ MapModelChange::getElevationLayer方法的具体用法?C++ MapModelChange::getElevationLayer怎么用?C++ MapModelChange::getElevationLayer使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MapModelChange
的用法示例。
在下文中一共展示了MapModelChange::getElevationLayer方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: switch
void
MapCallback::onMapModelChanged( const MapModelChange& change )
{
switch( change.getAction() )
{
case MapModelChange::ADD_ELEVATION_LAYER:
onElevationLayerAdded( change.getElevationLayer(), change.getFirstIndex() ); break;
case MapModelChange::ADD_IMAGE_LAYER:
onImageLayerAdded( change.getImageLayer(), change.getFirstIndex() ); break;
case MapModelChange::ADD_MASK_LAYER:
onMaskLayerAdded( change.getMaskLayer() ); break;
case MapModelChange::ADD_MODEL_LAYER:
onModelLayerAdded( change.getModelLayer(), change.getFirstIndex() ); break;
case MapModelChange::REMOVE_ELEVATION_LAYER:
onElevationLayerRemoved( change.getElevationLayer(), change.getFirstIndex() ); break;
case MapModelChange::REMOVE_IMAGE_LAYER:
onImageLayerRemoved( change.getImageLayer(), change.getFirstIndex() ); break;
case MapModelChange::REMOVE_MASK_LAYER:
onMaskLayerRemoved( change.getMaskLayer() ); break;
case MapModelChange::REMOVE_MODEL_LAYER:
onModelLayerRemoved( change.getModelLayer() ); break;
case MapModelChange::MOVE_ELEVATION_LAYER:
onElevationLayerMoved( change.getElevationLayer(), change.getFirstIndex(), change.getSecondIndex() ); break;
case MapModelChange::MOVE_IMAGE_LAYER:
onImageLayerMoved( change.getImageLayer(), change.getFirstIndex(), change.getSecondIndex() ); break;
case MapModelChange::MOVE_MODEL_LAYER:
onModelLayerMoved( change.getModelLayer(), change.getFirstIndex(), change.getSecondIndex() ); break;
case MapModelChange::UNSPECIFIED: break;
default: break;
}
}
示例2: switch
void
OSGTerrainEngineNode::onMapModelChanged( const MapModelChange& change )
{
_update_mapf->sync();
// dispatch the change handler
if ( change.getLayer() )
{
// first inform the texture compositor with the new model changes:
if ( _texCompositor.valid() && change.getImageLayer() )
{
_texCompositor->applyMapModelChange( change );
}
// then apply the actual change:
switch( change.getAction() )
{
case MapModelChange::ADD_IMAGE_LAYER:
addImageLayer( change.getImageLayer() );
break;
case MapModelChange::REMOVE_IMAGE_LAYER:
removeImageLayer( change.getImageLayer() );
break;
case MapModelChange::ADD_ELEVATION_LAYER:
addElevationLayer( change.getElevationLayer() );
break;
case MapModelChange::REMOVE_ELEVATION_LAYER:
removeElevationLayer( change.getElevationLayer() );
break;
case MapModelChange::MOVE_IMAGE_LAYER:
moveImageLayer( change.getFirstIndex(), change.getSecondIndex() );
break;
case MapModelChange::MOVE_ELEVATION_LAYER:
moveElevationLayer( change.getFirstIndex(), change.getSecondIndex() );
break;
case MapModelChange::ADD_MODEL_LAYER:
case MapModelChange::REMOVE_MODEL_LAYER:
case MapModelChange::MOVE_MODEL_LAYER:
default: break;
}
}
// update the terrain revision in threaded mode
if ( _isStreaming )
{
//getTerrain()->incrementRevision();
static_cast<StreamingTerrainNode*>(_terrain)->updateTaskServiceThreads( *_update_mapf );
}
}
示例3: operator
void operator()(osg::Object*)
{
if ( s_updateRequired )
{
updateControlPanel();
s_updateRequired = false;
if (s_change.getElevationLayer())
{
OE_NOTICE << "Dirtying model layers.\n";
dirtyModelLayers();
}
}
}
示例4: if
void
TerrainEngineNode::onMapModelChanged( const MapModelChange& change )
{
if (change.getAction() == MapModelChange::ADD_LAYER &&
change.getImageLayer() != 0L)
{
change.getImageLayer()->addCallback( _imageLayerController.get() );
}
else if (change.getAction() == MapModelChange::REMOVE_LAYER &&
change.getImageLayer() != 0L)
{
change.getImageLayer()->removeCallback( _imageLayerController.get() );
}
if (change.getElevationLayer() != 0L)
{
getTerrain()->notifyMapElevationChanged();
}
// notify that a redraw is required.
requestRedraw();
}
示例5: if
void
MPTerrainEngineNode::onMapModelChanged( const MapModelChange& change )
{
if ( change.getAction() == MapModelChange::BEGIN_BATCH_UPDATE )
{
_batchUpdateInProgress = true;
}
else if ( change.getAction() == MapModelChange::END_BATCH_UPDATE )
{
_batchUpdateInProgress = false;
if ( _refreshRequired )
refresh();
if ( _stateUpdateRequired )
updateState();
}
else
{
// update the thread-safe map model copy:
if ( _update_mapf->sync() )
{
_liveTiles->setMapRevision( _update_mapf->getRevision() );
}
// dispatch the change handler
if ( change.getLayer() )
{
// then apply the actual change:
switch( change.getAction() )
{
case MapModelChange::ADD_IMAGE_LAYER:
addImageLayer( change.getImageLayer() );
break;
case MapModelChange::REMOVE_IMAGE_LAYER:
removeImageLayer( change.getImageLayer() );
break;
case MapModelChange::ADD_ELEVATION_LAYER:
addElevationLayer( change.getElevationLayer() );
break;
case MapModelChange::REMOVE_ELEVATION_LAYER:
removeElevationLayer( change.getElevationLayer() );
break;
case MapModelChange::MOVE_IMAGE_LAYER:
moveImageLayer( change.getFirstIndex(), change.getSecondIndex() );
break;
case MapModelChange::MOVE_ELEVATION_LAYER:
moveElevationLayer( change.getFirstIndex(), change.getSecondIndex() );
break;
case MapModelChange::TOGGLE_ELEVATION_LAYER:
toggleElevationLayer( change.getElevationLayer() );
break;
case MapModelChange::ADD_MODEL_LAYER:
case MapModelChange::REMOVE_MODEL_LAYER:
case MapModelChange::MOVE_MODEL_LAYER:
default:
break;
}
}
}
}
示例6: if
void
MPTerrainEngineNode::onMapModelChanged( const MapModelChange& change )
{
if ( change.getAction() == MapModelChange::BEGIN_BATCH_UPDATE )
{
_batchUpdateInProgress = true;
}
else if ( change.getAction() == MapModelChange::END_BATCH_UPDATE )
{
_batchUpdateInProgress = false;
if ( _refreshRequired )
refresh();
if ( _shaderUpdateRequired )
updateShaders();
}
else
{
// update the thread-safe map model copy:
_update_mapf->sync();
// dispatch the change handler
if ( change.getLayer() )
{
// first inform the texture compositor with the new model changes:
if ( _texCompositor.valid() && change.getImageLayer() )
{
_texCompositor->applyMapModelChange( change );
}
// then apply the actual change:
switch( change.getAction() )
{
case MapModelChange::ADD_IMAGE_LAYER:
addImageLayer( change.getImageLayer() );
break;
case MapModelChange::REMOVE_IMAGE_LAYER:
removeImageLayer( change.getImageLayer() );
break;
case MapModelChange::ADD_ELEVATION_LAYER:
addElevationLayer( change.getElevationLayer() );
break;
case MapModelChange::REMOVE_ELEVATION_LAYER:
removeElevationLayer( change.getElevationLayer() );
break;
case MapModelChange::MOVE_IMAGE_LAYER:
moveImageLayer( change.getFirstIndex(), change.getSecondIndex() );
break;
case MapModelChange::MOVE_ELEVATION_LAYER:
moveElevationLayer( change.getFirstIndex(), change.getSecondIndex() );
break;
case MapModelChange::ADD_MODEL_LAYER:
case MapModelChange::REMOVE_MODEL_LAYER:
case MapModelChange::MOVE_MODEL_LAYER:
default:
break;
}
}
}
}