[libgis] Revert "Test pure distance based errors"



commit 22408daaad6f0c7b4075c2b0a725802b0659cfbe
Author: Andy Spencer <andy753421 gmail com>
Date:   Mon Nov 1 03:55:14 2010 +0000

    Revert "Test pure distance based errors"
    
    This reverts commit 2303ef60aac043b63daec4a70a9ee7d70e0ce62f.

 src/gis-opengl.c |    6 ------
 src/roam.c       |   15 +--------------
 src/roam.h       |    1 -
 3 files changed, 1 insertions(+), 21 deletions(-)
---
diff --git a/src/gis-opengl.c b/src/gis-opengl.c
index 3b4355b..e5f6468 100644
--- a/src/gis-opengl.c
+++ b/src/gis-opengl.c
@@ -249,12 +249,6 @@ static gboolean on_key_press(GisOpenGL *opengl, GdkEventKey *event, gpointer _)
 static gboolean _update_errors_cb(gpointer _opengl)
 {
 	GisOpenGL *opengl = _opengl;
-	gdouble lat, lon, elev;
-	gis_viewer_get_location(GIS_VIEWER(opengl), &lat, &lon, &elev);
-	lle2xyz(lat, lon, elev,
-		&opengl->sphere->view->pos[0],
-		&opengl->sphere->view->pos[1],
-		&opengl->sphere->view->pos[2]);
 	g_mutex_lock(opengl->sphere_lock);
 	roam_sphere_update_errors(opengl->sphere);
 	g_mutex_unlock(opengl->sphere_lock);
diff --git a/src/roam.c b/src/roam.c
index aa488fc..0f4995e 100644
--- a/src/roam.c
+++ b/src/roam.c
@@ -361,7 +361,6 @@ static gboolean roam_triangle_backface(RoamTriangle *triangle, RoamSphere *spher
  */
 void roam_triangle_update_errors(RoamTriangle *triangle, RoamSphere *sphere)
 {
-#if 0
 	/* Update points */
 	roam_point_update_projection(triangle->p.l, sphere->view);
 	roam_point_update_projection(triangle->p.m, sphere->view);
@@ -396,17 +395,6 @@ void roam_triangle_update_errors(RoamTriangle *triangle, RoamSphere *sphere)
 		    roam_triangle_backface(triangle->t.r, sphere))
 			triangle->error *= 500;
 	}
-#endif
-
-	/* For pure distance based errors */
-	(void)roam_triangle_visible;
-	(void)roam_triangle_backface;
-	RoamPoint *l = triangle->p.l;
-	RoamPoint *m = triangle->p.m;
-	RoamPoint *r = triangle->p.r;
-	double base = distd((gdouble*)l, (gdouble*)r);
-	double dist = distd((gdouble*)m, (gdouble*)sphere->view->pos);
-	triangle->error = base/dist;
 }
 
 /**
@@ -789,9 +777,8 @@ void roam_sphere_merge_one(RoamSphere *sphere)
 gint roam_sphere_split_merge(RoamSphere *sphere)
 {
 	gint iters = 0, max_iters = 500;
-	gint target = 10000;
 	//gint target = 4000;
-	//gint target = 2000;
+	gint target = 2000;
 	//gint target = 500;
 
 	if (!sphere->view)
diff --git a/src/roam.h b/src/roam.h
index 7c7371d..aec4b21 100644
--- a/src/roam.h
+++ b/src/roam.h
@@ -53,7 +53,6 @@ struct _RoamView {
 	gdouble proj[16];
 	gint view[4];
 	gint version;
-	gdouble pos[3];
 };
 
 /*************



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]