24 assert(allocator !=
NULL);
25 double dx,
dy, adx, ady;
53static void doSeg(
Edge * e,
double x1,
double y1,
double x2,
double y2)
64 double x1, x2, y1, y2;
66 if (e->
a == 1.0 && e->
b >= 0.0) {
83 x1 = e->
c - e->
b * y1;
87 x1 = e->
c - e->
b * y1;
98 x2 = e->
c - e->
b * y2;
102 x2 = e->
c - e->
b * y2;
109 y1 = (e->
c - x1) / e->
b;
113 y1 = (e->
c - x1) / e->
b;
117 y2 = (e->
c - x2) / e->
b;
121 y2 = (e->
c - x2) / e->
b;
128 else if (x1 >=
pxmin)
132 y1 = e->
c - e->
a * x1;
136 y1 = e->
c - e->
a * x1;
143 else if (x2 <=
pxmax)
147 y2 = e->
c - e->
a * x2;
151 y2 = e->
c - e->
a * x2;
158 x1 = (e->
c - y1) / e->
a;
162 x1 = (e->
c - y1) / e->
a;
166 x2 = (e->
c - y2) / e->
a;
170 x2 = (e->
c - y2) / e->
a;
174 doSeg(e, x1, y1, x2, y2);
178 assert(allocator !=
NULL);
void gv_arena_free(arena_t *arena, void *ptr, size_t size)
Region-based memory allocator.
#define ARENA_NEW(arena, type)
static Agedge_t * newedge(Agraph_t *g, Agnode_t *t, Agnode_t *h, IDTYPE id)
static void doSeg(Edge *e, double x1, double y1, double x2, double y2)
void endpoint(Edge *e, int lr, Site *s, arena_t *allocator)
Edge * gvbisect(Site *s1, Site *s2, arena_t *allocator)
void addVertex(Site *s, double x, double y)
insert vertex into sorted list
NEATOPROCS_API void s1(graph_t *, node_t *)