Revert "Test pure distance based errors"
authorAndy Spencer <andy753421@gmail.com>
Mon, 1 Nov 2010 03:55:14 +0000 (03:55 +0000)
committerAndy Spencer <andy753421@gmail.com>
Mon, 1 Nov 2010 03:55:14 +0000 (03:55 +0000)
This reverts commit 2303ef60aac043b63daec4a70a9ee7d70e0ce62f.

src/gis-opengl.c
src/roam.c
src/roam.h

index 3b4355b..e5f6468 100644 (file)
@@ -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);
index aa488fc..0f4995e 100644 (file)
@@ -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)
index 7c7371d..aec4b21 100644 (file)
@@ -53,7 +53,6 @@ struct _RoamView {
        gdouble proj[16];
        gint view[4];
        gint version;
-       gdouble pos[3];
 };
 
 /*************