Add and use TileIndex positionRelativeParent

This commit is contained in:
Erik Broberg
2016-11-28 18:19:04 +01:00
parent e6d758a418
commit f7957255f8
3 changed files with 13 additions and 12 deletions
+1 -8
View File
@@ -80,14 +80,7 @@ namespace globebrowsing {
uv.uvOffset *= 0.5;
uv.uvScale *= 0.5;
if (tileIndex.isEastChild()) {
uv.uvOffset.x += 0.5;
}
// In OpenGL, positive y direction is up
if (tileIndex.isNorthChild()) {
uv.uvOffset.y += 0.5;
}
uv.uvOffset += tileIndex.positionRelativeParent();
--tileIndex;
}