Graphviz 13.0.0~dev.20241220.2304
|
#include <assert.h>
#include <float.h>
#include <math.h>
#include <limits.h>
#include <neatogen/neato.h>
#include <pathplan/pathutil.h>
#include <stddef.h>
#include <util/alloc.h>
#include <util/exit.h>
Go to the source code of this file.
Data Structures | |
struct | vertex |
struct | polygon |
struct | active_edge |
struct | active_edge_list |
struct | data |
Macros | |
#define | SLOPE(p, q) ( ( ( p.y ) - ( q.y ) ) / ( ( p.x ) - ( q.x ) ) ) |
#define | EQ_PT(v, w) (((v).x == (w).x) && ((v).y == (w).y)) |
#define | after(v) (((v)==((v)->poly->finish))?((v)->poly->start):((v)+1)) |
#define | prior(v) (((v)==((v)->poly->start))?((v)->poly->finish):((v)-1)) |
#define | INBOX(p, bb) ((p.x <= bb.UR.x) && (p.x >= bb.LL.x) && (p.y <= bb.UR.y) && (p.y >= bb.LL.y)) |
#define | NESTED(a, b) (INBOX(a.LL,b) && INBOX(a.UR,b)) |
Typedefs | |
typedef struct active_edge | active_edge |
typedef struct polygon | polygon |
typedef struct active_edge_list | active_edge_list |
Functions | |
static int | sign (double v) |
static void | sgnarea (vertex *l, vertex *m, int i[]) |
static int | between (double f, double g, double h) |
static int | online (vertex *l, vertex *m, int i) |
static int | intpoint (vertex *l, vertex *m, double *x, double *y, int cond) |
static void | putSeg (int i, vertex *v) |
static int | realIntersect (vertex *firstv, vertex *secondv, pointf p) |
static int | find_intersection (vertex *l, vertex *m) |
static int | gt (const void *a, const void *b) |
static int | find_ints (vertex vertex_list[], size_t nvertices) |
static int | findInside (Ppoly_t **polys, int n_polys, polygon *polygon_list) |
int | Plegal_arrangement (Ppoly_t **polys, int n_polys) |
#define EQ_PT | ( | v, | |
w | |||
) | (((v).x == (w).x) && ((v).y == (w).y)) |
#define INBOX | ( | p, | |
bb | |||
) | ((p.x <= bb.UR.x) && (p.x >= bb.LL.x) && (p.y <= bb.UR.y) && (p.y >= bb.LL.y)) |
#define SLOPE | ( | p, | |
q | |||
) | ( ( ( p.y ) - ( q.y ) ) / ( ( p.x ) - ( q.x ) ) ) |
typedef struct active_edge active_edge |
typedef struct active_edge_list active_edge_list |
|
static |
where is g
relative to the interval delimited by f
and h
?
The order of f
and h
is not assumed. That is, the interval defined may be (f, h)
or (h, f)
depending on whether f
is less than or greater than h
.
f | First boundary of the interval |
g | Value to test |
h | Second boundary of the interval |
Definition at line 95 of file legal.c.
Referenced by online().
Definition at line 233 of file legal.c.
References intpoint(), MAX, online(), realIntersect(), sgnarea(), pointf_s::x, and pointf_s::y.
Referenced by find_ints(), and find_ints().
|
static |
Definition at line 282 of file legal.c.
References vertex::active, after, agerrorf(), active_edge_list::final, find_intersection(), active_edge_list::first, free(), gt(), gv_alloc(), gv_calloc(), active_edge::last, active_edge::name, active_edge::next, active_edge_list::number, nvertices, and prior.
Referenced by Plegal_arrangement(), and Plegal_arrangement().
Definition at line 386 of file legal.c.
References in_poly(), NESTED, and Ppoly_t::ps.
Referenced by Plegal_arrangement().
|
static |
Definition at line 260 of file legal.c.
Referenced by find_ints().
Definition at line 130 of file legal.c.
References after, le, online(), vertex::pos, SLOPE, pointf_s::x, and pointf_s::y.
Referenced by find_intersection().
Definition at line 118 of file legal.c.
References after, between(), vertex::pos, pointf_s::x, and pointf_s::y.
Referenced by find_intersection(), and intpoint().
int Plegal_arrangement | ( | Ppoly_t ** | polys, |
int | n_polys | ||
) |
Definition at line 413 of file legal.c.
References vertex::active, polygon::bb, find_ints(), findInside(), polygon::finish, free(), gv_calloc(), boxf::LL, Ppoly_t::pn, vertex::poly, vertex::pos, Ppoly_t::ps, polygon::start, boxf::UR, pointf_s::x, Pxy_t::x, pointf_s::y, and Pxy_t::y.
Referenced by compoundEdges(), spline_edges_(), and vc_refresh().
|
static |
Definition at line 195 of file legal.c.
References after, vertex::pos, pointf_s::x, and pointf_s::y.
Referenced by realIntersect().
Definition at line 205 of file legal.c.
References after, EQ_PT, vertex::pos, putSeg(), Verbose, pointf_s::x, and pointf_s::y.
Referenced by find_intersection().
Definition at line 65 of file legal.c.
References after, vertex::pos, sign(), pointf_s::x, and pointf_s::y.
Referenced by find_intersection().
|
static |
Definition at line 54 of file legal.c.
Referenced by _sfcvt(), countHorzCross(), countVertCross(), sfprint(), and sgnarea().