]> Pileus Git - grits/blobdiff - src/roam.c
Debugging and memory checking
[grits] / src / roam.c
index 7a1d6d3a86d961ae5c5a7771a026c122108bec88..a3bc847f40a01dbabe957039f737def9f10c4741 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2009 Andy Spencer <spenceal@rose-hulman.edu>
+ * Copyright (C) 2009-2010 Andy Spencer <andy753421@gmail.com>
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -101,7 +101,7 @@ void roam_point_update_projection(RoamPoint *self, RoamSphere *sphere)
        static int count   = 0;
        static int version = 0;
        if (version != sphere->view->version) {
-               g_debug("Projected %d points", count);
+               g_debug("RoamPoint: Projected %d points", count);
                count   = 0;
                version = sphere->view->version;
        }
@@ -650,6 +650,9 @@ static GList *_roam_sphere_get_intersect_rec(RoamTriangle *tri, GList *list,
                return g_list_prepend(list, tri);
        }
 }
+/* Warning: This grabs pointers to triangles which can be changed by other
+ * calls, e.g. split_merge. If you use this, you need to do some locking to
+ * prevent the returned list from becomming stale. */
 GList *roam_sphere_get_intersect(RoamSphere *self, gboolean all,
                gdouble n, gdouble s, gdouble e, gdouble w)
 {
@@ -672,6 +675,7 @@ void roam_sphere_free_tri(RoamTriangle *tri)
 }
 void roam_sphere_free(RoamSphere *self)
 {
+       g_debug("RoamSphere: free");
        /* Slow method, but it should work */
        while (self->polys > 8)
                roam_sphere_merge_one(self);