[Marble-commits] KDE/kdeedu/marble/src/lib
Jens-Michael Hoffmann
jensmh at gmx.de
Sun Feb 21 19:02:54 CET 2010
SVN commit 1093910 by jmhoffmann:
StackedTile: rename methods addBaseTile and hasBaseTiles to addTile and hasTiles.
The term "base tile" is used within Marble to denote tiles of the lowest
available zoom level (also called "level zero").
M +15 -15 StackedTile.cpp
M +2 -2 StackedTile.h
M +4 -4 StackedTileLoader.cpp
M +3 -3 StackedTile_p.h
--- trunk/KDE/kdeedu/marble/src/lib/StackedTile.cpp #1093909:1093910
@@ -76,8 +76,8 @@
delete [] jumpTable32;
delete [] jumpTable8;
- QVector<TextureTile*>::const_iterator pos = m_baseTiles.constBegin();
- QVector<TextureTile*>::const_iterator const end = m_baseTiles.constEnd();
+ QVector<TextureTile*>::const_iterator pos = m_tiles.constBegin();
+ QVector<TextureTile*>::const_iterator const end = m_tiles.constEnd();
for (; pos != end; ++pos )
// only delete tiles with stateUptodate as the other ones are managed
// by the TileLoader until they are fully up to date.
@@ -269,8 +269,8 @@
bool StackedTile::expired() const
{
bool result = false;
- QVector<TextureTile*>::const_iterator pos = d->m_baseTiles.constBegin();
- QVector<TextureTile*>::const_iterator const end = d->m_baseTiles.constEnd();
+ QVector<TextureTile*>::const_iterator pos = d->m_tiles.constBegin();
+ QVector<TextureTile*>::const_iterator const end = d->m_tiles.constEnd();
for (; pos != end; ++pos )
result |= (*pos)->expired();
return result;
@@ -286,23 +286,23 @@
d->m_forMergedLayerDecorator = true;
}
-void StackedTile::addBaseTile( TextureTile * const simpleTile )
+void StackedTile::addTile( TextureTile * const tile )
{
- d->m_baseTiles.append( simpleTile );
+ d->m_tiles.append( tile );
deriveCompletionState();
}
void StackedTile::deriveCompletionState()
{
QMap<TextureTile::State, int> count;
- QVector<TextureTile*>::const_iterator pos = d->m_baseTiles.constBegin();
- QVector<TextureTile*>::const_iterator const end = d->m_baseTiles.constEnd();
+ QVector<TextureTile*>::const_iterator pos = d->m_tiles.constBegin();
+ QVector<TextureTile*>::const_iterator const end = d->m_tiles.constEnd();
for (; pos != end; ++pos )
++count[ (*pos)->state() ];
- if ( count[ TextureTile::StateUptodate ] == d->m_baseTiles.size() )
+ if ( count[ TextureTile::StateUptodate ] == d->m_tiles.size() )
d->m_state = TileComplete;
- else if ( count[ TextureTile::StateEmpty ] == d->m_baseTiles.size() )
+ else if ( count[ TextureTile::StateEmpty ] == d->m_tiles.size() )
d->m_state = TileEmpty;
else
d->m_state = TilePartial;
@@ -375,16 +375,16 @@
return &(d->m_resultTile);
}
-bool StackedTile::hasBaseTiles() const
+bool StackedTile::hasTiles() const
{
- return !d->m_baseTiles.isEmpty();
+ return !d->m_tiles.isEmpty();
}
void StackedTile::initResultTile()
{
- Q_ASSERT( hasBaseTiles() );
- QVector<TextureTile*>::const_iterator pos = d->m_baseTiles.constBegin();
- QVector<TextureTile*>::const_iterator const end = d->m_baseTiles.constEnd();
+ Q_ASSERT( hasTiles() );
+ QVector<TextureTile*>::const_iterator pos = d->m_tiles.constBegin();
+ QVector<TextureTile*>::const_iterator const end = d->m_tiles.constEnd();
for (; pos != end; ++pos )
if ( (*pos)->state() != TextureTile::StateEmpty )
switch ( (*pos)->mergeRule() ) {
--- trunk/KDE/kdeedu/marble/src/lib/StackedTile.h #1093909:1093910
@@ -78,10 +78,10 @@
Q_DECLARE_PRIVATE( StackedTile )
Q_DISABLE_COPY( StackedTile )
- void addBaseTile( TextureTile * const );
+ void addTile( TextureTile * const );
void deriveCompletionState();
void initJumpTables();
- bool hasBaseTiles() const;
+ bool hasTiles() const;
void initResultTile();
StackedTilePrivate *d;
--- trunk/KDE/kdeedu/marble/src/lib/StackedTileLoader.cpp #1093909:1093910
@@ -193,18 +193,18 @@
GeoSceneTexture const * const textureLayer = *pos;
TileId const simpleTileId( textureLayer->sourceDir(), stackedTileId.zoomLevel(),
stackedTileId.x(), stackedTileId.y() );
- mDebug() << "StackedTileLoader::loadTile: base tile" << textureLayer->sourceDir()
+ mDebug() << "StackedTileLoader::loadTile: tile" << textureLayer->sourceDir()
<< simpleTileId.toString();
TextureTile * const simpleTile = d->m_simpleTileLoader->loadTile( stackedTileId,
simpleTileId );
// hack to try clouds, first tile is not handled here, MergeCopy is the default,
// the merge rule for following tiles is set to MergeMultiply here
- if ( simpleTile && tile->hasBaseTiles() )
+ if ( simpleTile && tile->hasTiles() )
simpleTile->setMergeRule( TextureTile::MergeMultiply );
if ( simpleTile )
- tile->addBaseTile( simpleTile );
+ tile->addTile( simpleTile );
}
- Q_ASSERT( tile->hasBaseTiles() );
+ Q_ASSERT( tile->hasTiles() );
if ( tile->state() != StackedTile::TileEmpty ) {
tile->initResultTile();
--- trunk/KDE/kdeedu/marble/src/lib/StackedTile_p.h #1093909:1093910
@@ -35,7 +35,7 @@
uchar **jumpTable8;
uint **jumpTable32;
- QVector<TextureTile*> m_baseTiles;
+ QVector<TextureTile*> m_tiles;
QImage m_resultTile;
int m_depth;
@@ -47,8 +47,8 @@
inline uint pixel( int x, int y ) const;
inline uint pixelF( qreal x, qreal y, const QRgb& pixel ) const;
- void mergeCopyToResult( TextureTile const * const baseTile );
- void mergeMultiplyToResult( TextureTile const * const baseTile );
+ void mergeCopyToResult( TextureTile const * const tile );
+ void mergeMultiplyToResult( TextureTile const * const tile );
};
}
More information about the Marble-commits
mailing list