本文整理汇总了C++中ImageLayerVector::rbegin方法的典型用法代码示例。如果您正苦于以下问题:C++ ImageLayerVector::rbegin方法的具体用法?C++ ImageLayerVector::rbegin怎么用?C++ ImageLayerVector::rbegin使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ImageLayerVector
的用法示例。
在下文中一共展示了ImageLayerVector::rbegin方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: mapf
void
updateControlPanel()
{
// erase all child controls and just rebuild them b/c we're lazy.
//Rebuild all the image layers
s_imageBox->clearControls();
int row = 0;
LabelControl* activeLabel = new LabelControl( "Image Layers", 20, osg::Vec4f(1,1,0,1) );
s_imageBox->setControl( 1, row++, activeLabel );
// the active map layers:
MapFrame mapf( s_activeMap.get() );
ImageLayerVector imageLayers;
mapf.getLayers(imageLayers);
int layerNum = imageLayers.size()-1;
for( ImageLayerVector::const_reverse_iterator i = imageLayers.rbegin(); i != imageLayers.rend(); ++i )
createLayerItem( s_imageBox, row++, layerNum--, imageLayers.size(), i->get(), true );
MapFrame mapf2( s_inactiveMap.get() );
imageLayers.clear();
mapf2.getLayers(imageLayers);
if ( imageLayers.size() > 0 )
{
LabelControl* inactiveLabel = new LabelControl( "Removed:", 18, osg::Vec4f(1,1,0,1) );
s_imageBox->setControl( 1, row++, inactiveLabel );
for( unsigned int i=0; i<imageLayers.size(); ++i )
{
createLayerItem( s_imageBox, row++, -1, -1, imageLayers[i].get(), false );
}
}
//Rebuild the elevation layers
s_elevationBox->clearControls();
row = 0;
activeLabel = new LabelControl( "Elevation Layers", 20, osg::Vec4f(1,1,0,1) );
s_elevationBox->setControl( 1, row++, activeLabel );
// the active map layers:
ElevationLayerVector elevationLayers;
mapf.getLayers(elevationLayers);
layerNum = elevationLayers.size()-1;
for( ElevationLayerVector::const_reverse_iterator i = elevationLayers.rbegin(); i != elevationLayers.rend(); ++i )
createLayerItem( s_elevationBox, row++, layerNum--, elevationLayers.size(), i->get(), true );
if ( mapf2.elevationLayers().size() > 0 )
{
LabelControl* inactiveLabel = new LabelControl( "Removed:", 18, osg::Vec4f(1,1,0,1) );
s_elevationBox->setControl( 1, row++, inactiveLabel );
for( unsigned int i=0; i<mapf2.elevationLayers().size(); ++i )
{
createLayerItem( s_elevationBox, row++, -1, -1, mapf2.elevationLayers().at(i), false );
}
}
//Rebuild the model layers
s_modelBox->clearControls();
row = 0;
activeLabel = new LabelControl( "Model Layers", 20, osg::Vec4f(1,1,0,1) );
s_modelBox->setControl( 1, row++, activeLabel );
// the active map layers:
ModelLayerVector modelLayers;
mapf.getLayers(modelLayers);
for( ModelLayerVector::const_reverse_iterator i = modelLayers.rbegin(); i != modelLayers.rend(); ++i )
createModelLayerItem( s_modelBox, row++, i->get(), true );
}