[libgis] Rename GisBBox to GisBounds
- From: Andy Spencer <andys src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgis] Rename GisBBox to GisBounds
- Date: Mon, 1 Nov 2010 04:45:23 +0000 (UTC)
commit e4de9d051f0f61a2f0eaa97e631bc7b891dc2eaf
Author: Andy Spencer <andy753421 gmail com>
Date: Sun Oct 24 11:40:30 2010 +0000
Rename GisBBox to GisBounds
It sounds better..
src/gis-util.c | 18 +++++++++---------
src/gis-util.h | 8 ++++----
src/objects/gis-tile.c | 10 +++++-----
src/objects/gis-tile.h | 4 ++--
4 files changed, 20 insertions(+), 20 deletions(-)
---
diff --git a/src/gis-util.c b/src/gis-util.c
index f748cd2..d42cee5 100644
--- a/src/gis-util.c
+++ b/src/gis-util.c
@@ -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;
}
diff --git a/src/gis-util.h b/src/gis-util.h
index 1b03f2f..ccc7558 100644
--- a/src/gis-util.h
+++ b/src/gis-util.h
@@ -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);
diff --git a/src/objects/gis-tile.c b/src/objects/gis-tile.c
index fbffd6f..9ee747b 100644
--- a/src/objects/gis-tile.c
+++ b/src/objects/gis-tile.c
@@ -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));
diff --git a/src/objects/gis-tile.h b/src/objects/gis-tile.h
index c912b5a..39cdeea 100644
--- a/src/objects/gis-tile.h
+++ b/src/objects/gis-tile.h
@@ -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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]