[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [45431] trunk/blender/source/gameengine/ Ketsji/KX_Dome.cpp: spherical panoramic fix
Dalai Felinto
dfelinto at gmail.com
Fri Apr 6 00:06:45 CEST 2012
Revision: 45431
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=45431
Author: dfelinto
Date: 2012-04-05 22:06:45 +0000 (Thu, 05 Apr 2012)
Log Message:
-----------
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.
Modified Paths:
--------------
trunk/blender/source/gameengine/Ketsji/KX_Dome.cpp
Modified: trunk/blender/source/gameengine/Ketsji/KX_Dome.cpp
===================================================================
--- trunk/blender/source/gameengine/Ketsji/KX_Dome.cpp 2012-04-05 16:23:47 UTC (rev 45430)
+++ trunk/blender/source/gameengine/Ketsji/KX_Dome.cpp 2012-04-05 22:06:45 UTC (rev 45431)
@@ -1342,7 +1342,7 @@
{
// 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 @@
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;
More information about the Bf-blender-cvs
mailing list