Debian Codegraph @

lib/pathplan/vis.h

raw
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
11 #pragma once
12
13 #include <assert.h>
14 #include <math.h>
15 #include <stdbool.h>
16 #include <stdlib.h>
17 #include <limits.h>
18 #include "vispath.h"
19 #include "pathutil.h"
20
21 #ifdef __cplusplus
22 extern "C" {
23 #endif
24
25 typedef COORD **array2;
26
27 #define EQ(p,q) ((p.x == q.x) && (p.y == q.y))
28
29 struct vconfig_s {
30 int Npoly;
31 int N; /* number of points in walk of barriers */
32 Ppoint_t *P; /* barrier points */
33 int *start;
34 int *next;
35 int *prev;
36
37 /* this is computed from the above */
38 array2 vis;
39 };
40 #ifdef GVDLL
41 #ifdef PATHPLAN_EXPORTS
42 #define VIS_API __declspec(dllexport)
43 #else
44 #define VIS_API __declspec(dllimport)
45 #endif
46 #endif
47
48 #ifndef VIS_API
49 #define VIS_API /* nothing */
50 #endif
51
52 VIS_API COORD *ptVis(vconfig_t *, int, Ppoint_t);
53 VIS_API bool directVis(Ppoint_t, int, Ppoint_t, int, vconfig_t *);
54 VIS_API void visibility(vconfig_t *);
55 VIS_API int *makePath(Ppoint_t p, int pp, COORD * pvis,
56 Ppoint_t q, int qp, COORD * qvis,
57 vconfig_t * conf);
58
59 #undef VIS_API
60
61 #ifdef __cplusplus
62 }
63 #endif