22 assert(allocator !=
NULL);
23 double dx,
dy, adx, ady;
51static void doSeg(
Edge * e,
double x1,
double y1,
double x2,
double y2)
62 double x1, x2, y1, y2;
64 if (e->
a == 1.0 && e->
b >= 0.0) {
81 x1 = e->
c - e->
b * y1;
85 x1 = e->
c - e->
b * y1;
96 x2 = e->
c - e->
b * y2;
100 x2 = e->
c - e->
b * y2;
107 y1 = (e->
c - x1) / e->
b;
111 y1 = (e->
c - x1) / e->
b;
115 y2 = (e->
c - x2) / e->
b;
119 y2 = (e->
c - x2) / e->
b;
126 else if (x1 >=
pxmin)
130 y1 = e->
c - e->
a * x1;
134 y1 = e->
c - e->
a * x1;
141 else if (x2 <=
pxmax)
145 y2 = e->
c - e->
a * x2;
149 y2 = e->
c - e->
a * x2;
156 x1 = (e->
c - y1) / e->
a;
160 x1 = (e->
c - y1) / e->
a;
164 x2 = (e->
c - y2) / e->
a;
168 x2 = (e->
c - y2) / e->
a;
172 doSeg(e, x1, y1, x2, y2);
176 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 *)