vispath.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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 <pathgeom.h>
  12. #ifdef __cplusplus
  13. extern "C" {
  14. #endif
  15. #ifdef GVDLL
  16. #ifdef PATHPLAN_EXPORTS
  17. #define VISPATH_API __declspec(dllexport)
  18. #else
  19. #define VISPATH_API __declspec(dllimport)
  20. #endif
  21. #endif
  22. #ifndef VISPATH_API
  23. #define VISPATH_API /* nothing */
  24. #endif
  25. /* open a visibility graph
  26. * Points in polygonal obstacles must be in clockwise order.
  27. */
  28. VISPATH_API vconfig_t *Pobsopen(Ppoly_t ** obstacles, int n_obstacles);
  29. /* close a visibility graph, freeing its storage */
  30. VISPATH_API void Pobsclose(vconfig_t * config);
  31. /* route a polyline from p0 to p1, avoiding obstacles.
  32. * if an endpoint is inside an obstacle, pass the polygon's index >=0
  33. * if the endpoint is not inside an obstacle, pass POLYID_NONE
  34. * if the endpoint location is not known, pass POLYID_UNKNOWN
  35. */
  36. VISPATH_API void Pobspath(vconfig_t *config, Ppoint_t p0, int poly0,
  37. Ppoint_t p1, int poly1,
  38. Ppolyline_t *output_route);
  39. #define POLYID_NONE -1111
  40. #define POLYID_UNKNOWN -2222
  41. #undef VISPATH_API
  42. #ifdef __cplusplus
  43. }
  44. #endif