本文整理汇总了C++中Layers::push_back方法的典型用法代码示例。如果您正苦于以下问题:C++ Layers::push_back方法的具体用法?C++ Layers::push_back怎么用?C++ Layers::push_back使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Layers
的用法示例。
在下文中一共展示了Layers::push_back方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: getDateOfLastModification
bool System::getDateOfLastModification(osgTerrain::TerrainTile *source, Date &date)
{
typedef std::list<osgTerrain::Layer *> Layers;
Layers layers;
if (source->getElevationLayer())
{
layers.push_back(source->getElevationLayer());
}
for (unsigned int i = 0; i < source->getNumColorLayers(); ++i)
{
osgTerrain::Layer *layer = source->getColorLayer(i);
if (layer)
{
layers.push_back(layer);
}
}
typedef std::list<std::string> Filenames;
Filenames filenames;
for (Layers::iterator itr = layers.begin();
itr != layers.end();
++itr)
{
osgTerrain::CompositeLayer *compositeLayer = dynamic_cast<osgTerrain::CompositeLayer *>(*itr);
if (compositeLayer)
{
for (unsigned int i = 0; i < compositeLayer->getNumLayers(); ++i)
{
filenames.push_back(compositeLayer->getFileName(i));
}
}
else
{
filenames.push_back((*itr)->getFileName());
}
}
bool modified = false;
for (Filenames::iterator itr = filenames.begin();
itr != filenames.end();
++itr)
{
Date lastModification;
if (lastModification.setWithDateOfLastModification(*itr))
{
if (lastModification > date)
{
date = lastModification;
modified = true;
}
}
}
return modified;
}