dataquad.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /*-
  2. * Written by H. Mitasova, I. Kosinovsky, D. Gerdes Fall 1992
  3. * University of Illinois
  4. * US Army Construction Engineering Research Lab
  5. * Copyright 1992, H. Mitasova (University of Illinois),
  6. * I. Kosinovsky, (USA-CERL), and D.Gerdes (USA-CERL)
  7. *
  8. * Modified by H.Mitasova November 1996 to include variable smoothing
  9. */
  10. #ifndef DATAQUAD_H
  11. #define DATAQUAD_H
  12. #define NW 1
  13. #define NE 2
  14. #define SW 3
  15. #define SE 4
  16. struct triple
  17. {
  18. double x;
  19. double y;
  20. double z;
  21. double sm; /* structure extended to incl. variable smoothing */
  22. };
  23. struct quaddata
  24. {
  25. double x_orig;
  26. double y_orig;
  27. double xmax;
  28. double ymax;
  29. int n_rows;
  30. int n_cols;
  31. int n_points;
  32. struct triple *points;
  33. };
  34. struct triple *quad_point_new(double, double, double, double);
  35. struct quaddata *quad_data_new(double, double, double, double, int, int, int,
  36. int);
  37. int quad_compare(struct triple *, struct quaddata *);
  38. int quad_add_data(struct triple *, struct quaddata *, double);
  39. int quad_intersect(struct quaddata *, struct quaddata *);
  40. int quad_division_check(struct quaddata *, int);
  41. struct quaddata **quad_divide_data(struct quaddata *, int, double);
  42. int quad_get_points(struct quaddata *, struct quaddata *, int);
  43. #endif