|
[Hugin-cvs] /hgrepo/h/hu/hugin/hugin: fixed mirror flipped images
on the pan...
From: <hugin-cvs@li...> - 2010-08-18 12:31
|
details: http://hugin.hg.sourceforge.net/hgweb/hugin/hugin/hgrepo/h/hu/hugin/hugin/rev/d9a17bea7135 changeset: 4234:d9a17bea7135 user: dmakreshanski <dmakreshanski@...> date: Wed Aug 18 14:31:36 2010 +0200 description: fixed mirror flipped images on the panosphere diffstat: TODO | 1 - src/hugin1/hugin/GLRenderer.cpp | 8 ++++---- src/hugin1/hugin/MeshManager.cpp | 6 +++--- src/hugin1/hugin/ProjectionGridTool.cpp | 7 +++---- src/hugin1/hugin/ToolHelper.cpp | 1 - 5 files changed, 10 insertions(+), 13 deletions(-) diffs (117 lines): diff -r bde397bb7e41 -r d9a17bea7135 TODO --- a/TODO Wed Aug 18 12:34:07 2010 +0200 +++ b/TODO Wed Aug 18 14:31:36 2010 +0200 @@ -24,7 +24,6 @@ - Implement the better handling of image groups - Bug, sometimes changing the FOV sliders doesn't cause the overview to be redrawn - Add informative status messages - - The images are mirror flipped on the panosphere - Automatic adjustment of the zoom level for the mosaic plane - Toggle buttons to show hide the overview and preview canvases diff -r bde397bb7e41 -r d9a17bea7135 src/hugin1/hugin/GLRenderer.cpp --- a/src/hugin1/hugin/GLRenderer.cpp Wed Aug 18 12:34:07 2010 +0200 +++ b/src/hugin1/hugin/GLRenderer.cpp Wed Aug 18 14:31:36 2010 +0200 @@ -268,11 +268,11 @@ glEnable(GL_TEXTURE_2D); //To avoid z-order fight of the images if depth buffer is used, depth buffer is disabled and meshes are drawn twice, - //first with front faces culled so that the inner face of the sphere is visible and below the outter face, - //and afterwards the meshes are drawn again with the back faces culled + //first with back faces culled so that the inner face of the sphere is visible and below the outter face, + //and afterwards the meshes are drawn again with the front faces culled glEnable(GL_CULL_FACE); - glCullFace(GL_FRONT); + glCullFace(GL_BACK); //event called only before drawing of the images with front faces culled (the inner face of the panosphere) ((PanosphereOverviewToolHelper*)m_tool_helper)->BeforeDrawImagesBack(); @@ -324,7 +324,7 @@ // #endif glMatrixMode(GL_MODELVIEW); - glCullFace(GL_BACK); + glCullFace(GL_FRONT); ((PanosphereOverviewToolHelper*)m_tool_helper)->BeforeDrawImagesFront(); m_tool_helper->BeforeDrawImages(); diff -r bde397bb7e41 -r d9a17bea7135 src/hugin1/hugin/MeshManager.cpp --- a/src/hugin1/hugin/MeshManager.cpp Wed Aug 18 12:34:07 2010 +0200 +++ b/src/hugin1/hugin/MeshManager.cpp Wed Aug 18 14:31:36 2010 +0200 @@ -310,7 +310,7 @@ void MeshManager::PanosphereOverviewMeshInfo::Transform() { - glRotated(yaw, 0,1,0); + glRotated(yaw, 0,-1,0); glRotated(pitch, -1,0,0); } @@ -342,7 +342,7 @@ res.x, res.y, res.z, - th,-ph,r); + -th,-ph,r); return res; } @@ -375,7 +375,7 @@ res.vertex_coords[x][y][0], res.vertex_coords[x][y][1], res.vertex_coords[x][y][2], - th,-ph,r); + -th,-ph,r); // DEBUG_DEBUG("pano get " << res.vertex_coords[x][y][0] << " " << res.vertex_coords[x][y][1] << " " << res.vertex_coords[x][y][2]); // DEBUG_DEBUG("pano get " << coords.vertex_c[x][y][0] << " " << coords.vertex_c[x][y][1]); diff -r bde397bb7e41 -r d9a17bea7135 src/hugin1/hugin/ProjectionGridTool.cpp --- a/src/hugin1/hugin/ProjectionGridTool.cpp Wed Aug 18 12:34:07 2010 +0200 +++ b/src/hugin1/hugin/ProjectionGridTool.cpp Wed Aug 18 14:31:36 2010 +0200 @@ -156,7 +156,7 @@ glBindTexture(GL_TEXTURE_2D, texture_num); glMatrixMode(GL_TEXTURE); - //using just a sphere instead of the remapped mesh for better quality +// using just a sphere instead of the remapped mesh for better quality // glPushMatrix(); // glScalef(0.5,1,1); // glMatrixMode(GL_MODELVIEW); @@ -168,11 +168,11 @@ glRotated(180,1,0,0); glScalef(0.5,1,1); glMatrixMode(GL_MODELVIEW); -// mesh_info->CallList(); GLUquadric* grid = gluNewQuadric(); gluQuadricTexture(grid, GL_TRUE); glPushMatrix(); + glScalef(-1,1,1); glRotated(-90,1,0,0); gluSphere(grid, 101,40,20); glPopMatrix(); @@ -232,11 +232,10 @@ glScalef(0.5,1,1); glMatrixMode(GL_MODELVIEW); -// mesh_info->CallList(); - GLUquadric* grid = gluNewQuadric(); gluQuadricTexture(grid, GL_TRUE); glPushMatrix(); + glScalef(-1,1,1); glRotated(-90,1,0,0); gluSphere(grid, 101,40,20); glPopMatrix(); diff -r bde397bb7e41 -r d9a17bea7135 src/hugin1/hugin/ToolHelper.cpp --- a/src/hugin1/hugin/ToolHelper.cpp Wed Aug 18 12:34:07 2010 +0200 +++ b/src/hugin1/hugin/ToolHelper.cpp Wed Aug 18 14:31:36 2010 +0200 @@ -599,7 +599,6 @@ yaw += M_PI / 2.0; if (yaw < 0) yaw += 2 * M_PI; if (yaw > 2 * M_PI) yaw -= 2 * M_PI; - yaw = 2 * M_PI - yaw; pitch += M_PI / 2.0; pitch = M_PI - pitch; |
| Thread | Author | Date |
|---|---|---|
| [Hugin-cvs] /hgrepo/h/hu/hugin/hugin: fixed mirror flipped images on the pan... | <hugin-cvs@li...> |