dataquad.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. /*!
  2. * \file qtree.c
  3. *
  4. * \author
  5. * H. Mitasova, I. Kosinovsky, D. Gerdes, Fall 1993,
  6. * University of Illinois and
  7. * US Army Construction Engineering Research Lab
  8. *
  9. * \author H. Mitasova (University of Illinois),
  10. * \author I. Kosinovsky, (USA-CERL)
  11. * \author D.Gerdes (USA-CERL)
  12. *
  13. * \author modified by H. Mitasova, November 1996 (include variable smoothing)
  14. *
  15. * \copyright
  16. * (C) 1993-1996 by Helena Mitasova and the GRASS Development Team
  17. *
  18. * \copyright
  19. * This program is free software under the
  20. * GNU General Public License (>=v2).
  21. * Read the file COPYING that comes with GRASS for details.
  22. */
  23. #ifndef DATAQUAD_H
  24. #define DATAQUAD_H
  25. #define NW 1
  26. #define NE 2
  27. #define SW 3
  28. #define SE 4
  29. /*!
  30. * Point structure to keep coordinates
  31. *
  32. * It also contains smoothing for the given point.
  33. */
  34. struct triple
  35. {
  36. double x;
  37. double y;
  38. double z;
  39. double sm; /*!< variable smoothing */
  40. };
  41. struct quaddata
  42. {
  43. double x_orig;
  44. double y_orig;
  45. double xmax;
  46. double ymax;
  47. int n_rows;
  48. int n_cols;
  49. int n_points;
  50. struct triple *points;
  51. };
  52. struct triple *quad_point_new(double, double, double, double);
  53. struct quaddata *quad_data_new(double, double, double, double, int, int, int,
  54. int);
  55. int quad_compare(struct triple *, struct quaddata *);
  56. int quad_add_data(struct triple *, struct quaddata *, double);
  57. int quad_intersect(struct quaddata *, struct quaddata *);
  58. int quad_division_check(struct quaddata *, int);
  59. struct quaddata **quad_divide_data(struct quaddata *, int, double);
  60. int quad_get_points(struct quaddata *, struct quaddata *, int);
  61. #endif