Merge branch 'feature/globebrowsing' of github.com:OpenSpace/OpenSpace-Development into feature/globebrowsing

This commit is contained in:
Kalle Bladin
2016-06-14 00:20:55 -04:00
7 changed files with 27 additions and 8 deletions
+9 -1
View File
@@ -160,7 +160,7 @@ namespace openspace {
Vec3 cameraToEllipseCenter = globePosition - cameraPosition;
Geodetic2 camPos = ellipsoid.cartesianToGeodetic2(cameraPosition);
/*
struct CornerDist {
Geodetic2 corner;
float dist;
@@ -190,6 +190,14 @@ namespace openspace {
const Geodetic3 c1 = { cornerDists[1].corner, heights.min };
const Geodetic3 c2 = { cornerDists[2].corner, heights.max };
const Geodetic3 c3 = { cornerDists[3].corner, heights.max };
*/
Chunk::BoundingHeights heights = chunk.getBoundingHeights();
const Geodetic3 c0 = { chunk.surfacePatch().getCorner((Quad)0), heights.min };
const Geodetic3 c1 = { chunk.surfacePatch().getCorner((Quad)1), heights.min };
const Geodetic3 c2 = { chunk.surfacePatch().getCorner((Quad)2), heights.min };
const Geodetic3 c3 = { chunk.surfacePatch().getCorner((Quad)3), heights.min };
Vec3 A = cameraToEllipseCenter + ellipsoid.cartesianPosition(c0);
Vec3 B = cameraToEllipseCenter + ellipsoid.cartesianPosition(c1);