diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2012-04-06 02:06:45 +0400 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2012-04-06 02:06:45 +0400 |
commit | 110a1526b62aa738ac0639ba51d93e2e7611751d (patch) | |
tree | b6d01744bccb063951c636d13cef71f8b55951be /source/gameengine/Ketsji/KX_Dome.cpp | |
parent | 91eeddc9738a78cdab51acdf19e1a2ad82457eca (diff) |
spherical panoramic fix
note: this was never correct and not a single soul bothered noticing that.
not really a surprise, this mode is more for debug than for anything else.
to test go to (game engine) Render -> Dome Mode -> Spherical Panorama
thanks to Aldo Zang to help me spotting the problem.
Diffstat (limited to 'source/gameengine/Ketsji/KX_Dome.cpp')
-rw-r--r-- | source/gameengine/Ketsji/KX_Dome.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/gameengine/Ketsji/KX_Dome.cpp b/source/gameengine/Ketsji/KX_Dome.cpp index adcacc0355e..eaabbdd8233 100644 --- a/source/gameengine/Ketsji/KX_Dome.cpp +++ b/source/gameengine/Ketsji/KX_Dome.cpp @@ -1342,7 +1342,7 @@ void KX_Dome::FlattenPanorama(MT_Vector3 verts[3]) { // it creates a full spherical panoramic (360deg) int i; - double phi; + double phi, theta; bool edge=false; for (i=0;i<3;i++) { @@ -1355,8 +1355,8 @@ void KX_Dome::FlattenPanorama(MT_Vector3 verts[3]) verts[i][0] = phi / MT_PI; verts[i][1] = 0; - verts[i][2] = atan2(verts[i][2], 1.0); - verts[i][2] /= MT_PI / 2; + theta = asin(verts[i][2]); + verts[i][2] = theta / MT_PI; } if (edge) { bool right=false; |