| 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 <stdbool.h> |
| 14 |
#include <stddef.h> |
| 15 |
#include <util/api.h> |
| 16 |
|
| 17 |
#ifdef __cplusplus |
| 18 |
extern "C" { |
| 19 |
#endif |
| 20 |
|
| 21 |
#include <neatogen/poly.h> |
| 22 |
#include <neatogen/voronoi.h> |
| 23 |
|
| 24 |
/// info concerning site |
| 25 |
typedef struct { |
| 26 |
Agnode_t *node; ///< libgraph node |
| 27 |
Site site; ///< site used by voronoi code |
| 28 |
bool overlaps; ///< true if node overlaps other nodes |
| 29 |
Poly poly; ///< polygon at node |
| 30 |
Point *verts; ///< sorted list of vertices of voronoi polygon |
| 31 |
size_t n_verts; ///< number of elements in `verts` |
| 32 |
} Info_t; |
| 33 |
|
| 34 |
/// array of node info |
| 35 |
extern Info_t *nodeInfo; |
| 36 |
|
| 37 |
/// insert vertex into sorted list |
| 38 |
PRIVATE void addVertex(Site *, double, double); |
| 39 |
|
| 40 |
#ifdef __cplusplus |
| 41 |
} |
| 42 |
#endif |