X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;ds=sidebyside;f=src%2Fplugins%2Fradar.h;h=34a260752ab7e7b5c2d9bceef1e6a736bd6b8172;hb=7200f71a7275a4ca3faa4d3d8182720fcc0b9496;hp=95367b47c3c12f804155b2b47ac9a21f1e983868;hpb=ca898105ec4018b54ac2f6f1327200624169103e;p=grits diff --git a/src/plugins/radar.h b/src/plugins/radar.h index 95367b4..34a2607 100644 --- a/src/plugins/radar.h +++ b/src/plugins/radar.h @@ -55,6 +55,7 @@ struct _GisPluginRadar { GtkWidget *progress_bar; GtkWidget *progress_label; SoupSession *soup; + guint time_changed_id; /* Private data for loading radars */ Radar *cur_radar; @@ -74,4 +75,34 @@ GType gis_plugin_radar_get_type(); /* Methods */ GisPluginRadar *gis_plugin_radar_new(GisWorld *world, GisView *view, GisOpenGL *opengl, GisPrefs *prefs); +/* Misc. RSL helpers */ +#define RSL_FOREACH_VOL(radar, volume, count, index) \ + guint count = 0; \ + for (guint index = 0; index < radar->h.nvolumes; index++) { \ + Volume *volume = radar->v[index]; \ + if (volume == NULL) continue; \ + count++; + +#define RSL_FOREACH_SWEEP(volume, sweep, count, index) \ + guint count = 0; \ + for (guint index = 0; index < volume->h.nsweeps; index++) { \ + Sweep *sweep = volume->sweep[index]; \ + if (sweep == NULL || sweep->h.elev == 0) continue; \ + count++; + +#define RSL_FOREACH_RAY(sweep, ray, count, index) \ + guint count = 0; \ + for (guint index = 0; index < sweep->h.nrays; index++) { \ + Ray *ray = sweep->ray[index]; \ + if (ray == NULL) continue; \ + count++; + +#define RSL_FOREACH_BIN(ray, bin, count, index) \ + guint count = 0; \ + for (guint index = 0; index < ray->h.nbins; index++) { \ + Range bin = ray->range[index]; \ + count++; + +#define RSL_FOREACH_END } + #endif