Moved PatchCoverage specific logic from TileProvider to PatchCoverageProvider

This commit is contained in:
Erik Broberg
2016-05-09 18:27:30 -04:00
parent acfda284c9
commit a816b71a5a
2 changed files with 8 additions and 8 deletions
+1 -5
View File
@@ -106,11 +106,7 @@ namespace openspace {
}
std::shared_ptr<Texture> TileProvider::getTile(GeodeticTileIndex tileIndex) {
// If the tile index is negative or too big it needs to wrap around
int nIndices = pow(2, tileIndex.level);
tileIndex.x += (tileIndex.x < 0) ? nIndices : ((tileIndex.x > nIndices - 1) ? -nIndices : 0);
tileIndex.y += (tileIndex.y < 0) ? nIndices : ((tileIndex.y > nIndices - 1) ? -nIndices : 0);
HashKey hashkey = tileIndex.hashKey();
if (_tileCache.exist(hashkey)) {