]> Pileus Git - grits/commitdiff
Rename GisBBox to GisBounds
authorAndy Spencer <andy753421@gmail.com>
Sun, 24 Oct 2010 11:40:30 +0000 (11:40 +0000)
committerAndy Spencer <andy753421@gmail.com>
Sun, 24 Oct 2010 11:40:30 +0000 (11:40 +0000)
It sounds better..

src/gis-util.c
src/gis-util.h
src/objects/gis-tile.c
src/objects/gis-tile.h

index f748cd2e280675a7170d143972f1ccbb3c277532..d42cee59d1a33c9c2b06e3950a49258ad0548b8c 100644 (file)
@@ -93,11 +93,11 @@ void gis_point_set_lle(GisPoint *point, gdouble lat, gdouble lon, gdouble elev)
 }
 
 
-/***********
- * GisBBox *
- ***********/
+/*************
+ * GisBounds *
+ *************/
 /**
- * gis_bbox_set_bounds:
+ * gis_bounds_set_bounds:
  * @n: the north edge
  * @s: the south edge
  * @e: the east edge
@@ -105,13 +105,13 @@ void gis_point_set_lle(GisPoint *point, gdouble lat, gdouble lon, gdouble elev)
  *
  * Set the north, south, east, and west edges of the bounding box
  */
-void gis_bbox_set_bounds(GisBBox *bbox,
+void gis_bounds_set_bounds(GisBounds *bounds,
                gdouble n, gdouble s, gdouble e, gdouble w)
 {
-       bbox->n = n;
-       bbox->s = s;
-       bbox->e = e;
-       bbox->w = w;
+       bounds->n = n;
+       bounds->s = s;
+       bounds->e = e;
+       bounds->w = w;
 }
 
 
index 1b03f2fa578ff1c314b8f6d9886c1a98dbe56d21..ccc75585ad702a7b9f9730e189dc87a5c84c2da5 100644 (file)
@@ -159,13 +159,13 @@ struct _GisPoint {
 void gis_point_set_lle(GisPoint *point,
                gdouble lat, gdouble lon, gdouble elev);
 
-/* GisBBox */
-typedef struct _GisBBox GisBBox;
-struct _GisBBox {
+/* GisBounds */
+typedef struct _GisBounds GisBounds;
+struct _GisBounds {
        gdouble n, s, e, w;
 };
 
-void gis_bbox_set_bounds(GisBBox *bbox,
+void gis_bounds_set_bounds(GisBounds *bounds,
                gdouble n, gdouble s, gdouble e, gdouble w);
 
 
index fbffd6ff0f799d638145230e89f9db1cc9524bee..9ee747bc0666aafbf01c6dd54632b83fd059dfdc 100644 (file)
@@ -58,8 +58,8 @@ GisTile *gis_tile_new(GisTile *parent,
        GisTile *tile = g_object_new(GIS_TYPE_TILE, NULL);
        tile->parent = parent;
        tile->atime  = time(NULL);
-       gis_bbox_set_bounds(&tile->coords, 0, 1, 1, 0);
-       gis_bbox_set_bounds(&tile->edge, n, s, e, w);
+       gis_bounds_set_bounds(&tile->coords, 0, 1, 1, 0);
+       gis_bounds_set_bounds(&tile->edge, n, s, e, w);
        return tile;
 }
 
@@ -90,7 +90,7 @@ gchar *gis_tile_get_path(GisTile *child)
        return g_string_free(path, FALSE);
 }
 
-static gdouble _gis_tile_get_min_dist(GisPoint *eye, GisBBox *bounds)
+static gdouble _gis_tile_get_min_dist(GisPoint *eye, GisBounds *bounds)
 {
        GisPoint pos = {};
        pos.lat = eye->lat > bounds->n ? bounds->n :
@@ -105,7 +105,7 @@ static gdouble _gis_tile_get_min_dist(GisPoint *eye, GisBBox *bounds)
        return distd(a, b);
 }
 
-static gboolean _gis_tile_precise(GisPoint *eye, GisBBox *bounds,
+static gboolean _gis_tile_precise(GisPoint *eye, GisBounds *bounds,
                gdouble max_res, gint width, gint height)
 {
        gdouble min_dist  = _gis_tile_get_min_dist(eye, bounds);
@@ -164,7 +164,7 @@ void gis_tile_update(GisTile *root, GisPoint *eye,
        int row, col;
        gis_tile_foreach_index(root, row, col) {
                GisTile **child = &root->children[row][col];
-               GisBBox edge;
+               GisBounds edge;
                edge.n = root->edge.n-(lat_step*(row+0));
                edge.s = root->edge.n-(lat_step*(row+1));
                edge.e = root->edge.w+(lon_step*(col+1));
index c912b5a171ef507e67aa02ecae1650a5610c65e8..39cdeea3dbfad2419b93dc63ebde078741fc824e 100644 (file)
@@ -42,10 +42,10 @@ struct _GisTile {
        gint zindex;
 
        /* North,South,East,West limits */
-       GisBBox edge;
+       GisBounds edge;
 
        /* Texture mapping coordinates */
-       GisBBox coords;
+       GisBounds coords;
 
        /* Pointers to parent/child nodes */
        GisTile *parent;