]> Pileus Git - grits/blob - src/plugins/radar-misc.h
Splitting GIS into a shared library, and a lot more
[grits] / src / plugins / radar-misc.h
1 #define RSL_FOREACH_VOL(radar, volume, count, index) \
2         guint count = 0; \
3         for (guint index = 0; index < radar->h.nvolumes; index++) { \
4                 Volume *volume = radar->v[index]; \
5                 if (volume == NULL) continue; \
6                 count++;
7
8 #define RSL_FOREACH_SWEEP(volume, sweep, count, index) \
9         guint count = 0; \
10         for (guint index = 0; index < volume->h.nsweeps; index++) { \
11                 Sweep *sweep = volume->sweep[index]; \
12                 if (sweep == NULL || sweep->h.elev == 0) continue; \
13                 count++;
14
15 #define RSL_FOREACH_RAY(sweep, ray, count, index) \
16         guint count = 0; \
17         for (guint index = 0; index < sweep->h.nrays; index++) { \
18                 Ray *ray = sweep->ray[index]; \
19                 if (ray == NULL) continue; \
20                 count++;
21
22 #define RSL_FOREACH_BIN(ray, bin, count, index) \
23         guint count = 0; \
24         for (guint index = 0; index < ray->h.nbins; index++) { \
25                 Range bin = ray->range[index]; \
26                 count++;
27
28 #define RSL_FOREACH_END }