当前位置: 首页>>代码示例>>C++>>正文


C++ Layers::end方法代码示例

本文整理汇总了C++中Layers::end方法的典型用法代码示例。如果您正苦于以下问题:C++ Layers::end方法的具体用法?C++ Layers::end怎么用?C++ Layers::end使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Layers的用法示例。


在下文中一共展示了Layers::end方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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;
}
开发者ID:nixz,项目名称:covise,代码行数:58,代码来源:System.cpp

示例2: end

 const_iterator end()   const { return m_layers.end();   }
开发者ID:BackupTheBerlios,项目名称:windstille-svn,代码行数:1,代码来源:timeline.hpp

示例3: LayerExists

bool LayerExists(LayerType layer)
{
  return s_layers.find(layer) != s_layers.end();
}
开发者ID:TurboK234,项目名称:dolphin,代码行数:4,代码来源:Config.cpp

示例4: createImages

QStringList SmilExportPlugin::createImages(const QList<KTScene *> &scenes, const QDir &dir, float sx, float sy, const char *format)
{
	QStringList paths;
	
	int nPhotogramsRenderized = 0;
	
	foreach(KTScene *scene, scenes )
	{
		Layers layers = scene->layers();
		
		bool m_isRendered = false;
	
		while ( ! m_isRendered )
		{
			Layers::iterator layerIterator = layers.begin();
			bool ok = true;
			
			QImage renderized = QImage(m_size.width(), m_size.height(), QImage::Format_RGB32);
			renderized.fill(qRgb(255, 255, 255));
			
			QPainter painter(&renderized);
			painter.setRenderHint(QPainter::Antialiasing);
			
			while ( layerIterator != layers.end() )
			{
				ok = ok && (nPhotogramsRenderized > (*layerIterator)->frames().count());
				
				if ( *layerIterator && nPhotogramsRenderized < (*layerIterator)->frames().count() && (*layerIterator)->isVisible() )
				{
					KTKeyFrame *frame = (*layerIterator)->frames()[nPhotogramsRenderized];
					if ( frame )
					{
						QList<AGraphicComponent *> componentList = frame->components();
						
						if ( componentList.count() > 0  )
						{
							QList<AGraphicComponent *>::iterator it = componentList.begin();
									
							while ( it != componentList.end() )
							{
								(*it)->draw( &painter);
								++it;
							}
						}
					}
				}
				++layerIterator;
			}
			
			QString file = "";
			QString extension = QString::fromLocal8Bit(format).toLower();
			if ( nPhotogramsRenderized < 10 )
			{
				file = QString("000%1").arg(nPhotogramsRenderized);
			}
			else if ( nPhotogramsRenderized < 100 )
			{
				file = QString("00%1").arg(nPhotogramsRenderized);
			}
			else if( nPhotogramsRenderized < 1000 )
			{
				file = QString("0%1").arg(nPhotogramsRenderized);
			}
			else if( nPhotogramsRenderized < 10000 )
			{
				file = QString("%1").arg(nPhotogramsRenderized);
			}
			
			if ( !renderized.isNull() )
			{
				QString dest = dir.path()+"/data/"+m_baseName+file+"."+extension;
				renderized.save(dest, format);
				
				paths << dest;
				
				createPar( dest, 1.0f/(float)scene->fps() );
			}
			
			if (ok )
			{
				m_isRendered = true;
			}
			
			nPhotogramsRenderized++;
		}
	}
开发者ID:BackupTheBerlios,项目名称:ktoon-svn,代码行数:86,代码来源:smilexportplugin.cpp


注:本文中的Layers::end方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。