vis.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. /*************************************************************************
  2. * Copyright (c) 2011 AT&T Intellectual Property
  3. * All rights reserved. This program and the accompanying materials
  4. * are made available under the terms of the Eclipse Public License v1.0
  5. * which accompanies this distribution, and is available at
  6. * https://www.eclipse.org/legal/epl-v10.html
  7. *
  8. * Contributors: Details at https://graphviz.org
  9. *************************************************************************/
  10. #pragma once
  11. #include <assert.h>
  12. #include <math.h>
  13. #include <stdbool.h>
  14. #include <stdlib.h>
  15. #include <limits.h>
  16. #include "vispath.h"
  17. #include "pathutil.h"
  18. #ifdef __cplusplus
  19. extern "C" {
  20. #endif
  21. typedef COORD **array2;
  22. #define EQ(p,q) ((p.x == q.x) && (p.y == q.y))
  23. struct vconfig_s {
  24. int Npoly;
  25. int N; /* number of points in walk of barriers */
  26. Ppoint_t *P; /* barrier points */
  27. int *start;
  28. int *next;
  29. int *prev;
  30. /* this is computed from the above */
  31. array2 vis;
  32. };
  33. #ifdef GVDLL
  34. #ifdef PATHPLAN_EXPORTS
  35. #define VIS_API __declspec(dllexport)
  36. #else
  37. #define VIS_API __declspec(dllimport)
  38. #endif
  39. #endif
  40. #ifndef VIS_API
  41. #define VIS_API /* nothing */
  42. #endif
  43. VIS_API COORD *ptVis(vconfig_t *, int, Ppoint_t);
  44. VIS_API bool directVis(Ppoint_t, int, Ppoint_t, int, vconfig_t *);
  45. VIS_API void visibility(vconfig_t *);
  46. VIS_API int *makePath(Ppoint_t p, int pp, COORD * pvis,
  47. Ppoint_t q, int qp, COORD * qvis,
  48. vconfig_t * conf);
  49. #undef VIS_API
  50. #ifdef __cplusplus
  51. }
  52. #endif