Go to the source code of this file.
Classes | |
struct | bbox_shape |
struct | edge_shape |
struct | it_shape |
struct | lmt_shape |
struct | p_shape |
struct | sbt_t_shape |
struct | st_shape |
struct | v_shape |
Defines | |
#define | ABOVE 0 |
#define | BELOW 1 |
#define | CLIP 0 |
#define | EQ(a, b) (fabs((a) - (b)) <= GPC_EPSILON) |
#define | FALSE 0 |
#define | FREE(p) {if (p) {free(p); (p)= NULL;}} |
#define | FWD_MIN(v, i, n) |
#define | INVERT_TRISTRIPS FALSE |
#define | LEFT 0 |
#define | MALLOC(p, b, s, t) |
#define | N_EDGE(d, e, p, i, j) |
#define | NEXT_INDEX(i, n) ((i + 1 ) % n) |
#define | NOT_FMAX(v, i, n) (v[NEXT_INDEX(i, n)].vertex.y > v[i].vertex.y) |
#define | NOT_RMAX(v, i, n) (v[PREV_INDEX(i, n)].vertex.y > v[i].vertex.y) |
#define | OPTIMAL(v, i, n) |
#define | P_EDGE(d, e, p, i, j) |
#define | PREV_INDEX(i, n) ((i - 1 + n) % n) |
#define | REV_MIN(v, i, n) |
#define | RIGHT 1 |
#define | SUBJ 1 |
#define | TRUE 1 |
#define | VERTEX(e, p, s, x, y) |
Typedefs | |
typedef struct bbox_shape | bbox |
typedef struct edge_shape | edge_node |
typedef struct it_shape | it_node |
typedef struct lmt_shape | lmt_node |
typedef struct p_shape | polygon_node |
typedef struct sbt_t_shape | sb_tree |
typedef struct st_shape | st_node |
typedef struct v_shape | vertex_node |
Enumerations | |
enum | bundle_state { UNBUNDLED, BUNDLE_HEAD, BUNDLE_TAIL } |
enum | h_state { NH, BH, TH } |
enum | vertex_type { NUL, EMX, ELI, TED, ERI, RED, IMM, IMN, EMN, EMM, LED, ILI, BED, IRI, IMX, FUL } |
Functions | |
static void | add_edge_to_aet (edge_node **aet, edge_node *edge, edge_node *prev) |
static void | add_intersection (it_node **it, edge_node *edge0, edge_node *edge1, double x, double y) |
static void | add_left (polygon_node *p, double x, double y) |
static void | add_local_min (polygon_node **p, edge_node *edge, double x, double y) |
static void | add_right (polygon_node *p, double x, double y) |
static void | add_st_edge (st_node **st, it_node **it, edge_node *edge, double dy) |
static void | add_to_sbtree (int *entries, sb_tree **sbtree, double y) |
static void | add_vertex (vertex_node **t, double x, double y) |
static edge_node ** | bound_list (lmt_node **lmt, double y) |
static void | build_intersection_table (it_node **it, edge_node *aet, double dy) |
static edge_node * | build_lmt (lmt_node **lmt, sb_tree **sbtree, int *sbt_entries, gpc_polygon *p, int type, gpc_op op) |
static void | build_sbt (int *entries, double *sbt, sb_tree *sbtree) |
static int | count_contours (polygon_node *polygon) |
static int | count_optimal_vertices (gpc_vertex_list c) |
static int | count_tristrips (polygon_node *tn) |
static bbox * | create_contour_bboxes (gpc_polygon *p) |
static void | free_sbtree (sb_tree **sbtree) |
void | gpc_add_contour (gpc_polygon *p, gpc_vertex_list *new_contour, int hole) |
void | gpc_free_polygon (gpc_polygon *p) |
void | gpc_free_tristrip (gpc_tristrip *t) |
void | gpc_polygon_clip (gpc_op op, gpc_polygon *subj, gpc_polygon *clip, gpc_polygon *result) |
void | gpc_polygon_to_tristrip (gpc_polygon *s, gpc_tristrip *t) |
void | gpc_read_polygon (FILE *fp, int read_hole_flags, gpc_polygon *p) |
void | gpc_tristrip_clip (gpc_op op, gpc_polygon *subj, gpc_polygon *clip, gpc_tristrip *result) |
void | gpc_write_polygon (FILE *fp, int write_hole_flags, gpc_polygon *p) |
static void | insert_bound (edge_node **b, edge_node *e) |
static void | merge_left (polygon_node *p, polygon_node *q, polygon_node *list) |
static void | merge_right (polygon_node *p, polygon_node *q, polygon_node *list) |
static void | minimax_test (gpc_polygon *subj, gpc_polygon *clip, gpc_op op) |
static void | new_tristrip (polygon_node **tn, edge_node *edge, double x, double y) |
static void | reset_it (it_node **it) |
static void | reset_lmt (lmt_node **lmt) |
Variables | |
const h_state | next_h_state [3][6] |
#define EQ | ( | a, | |
b | |||
) | (fabs((a) - (b)) <= GPC_EPSILON) |
((v[PREV_INDEX(i, n)].vertex.y >= v[i].vertex.y) \ && (v[NEXT_INDEX(i, n)].vertex.y > v[i].vertex.y))
#define INVERT_TRISTRIPS FALSE |
#define NEXT_INDEX | ( | i, | |
n | |||
) | ((i + 1 ) % n) |
#define NOT_FMAX | ( | v, | |
i, | |||
n | |||
) | (v[NEXT_INDEX(i, n)].vertex.y > v[i].vertex.y) |
#define NOT_RMAX | ( | v, | |
i, | |||
n | |||
) | (v[PREV_INDEX(i, n)].vertex.y > v[i].vertex.y) |
((v[PREV_INDEX(i, n)].y != v[i].y) || \ (v[NEXT_INDEX(i, n)].y != v[i].y))
#define PREV_INDEX | ( | i, | |
n | |||
) | ((i - 1 + n) % n) |
((v[PREV_INDEX(i, n)].vertex.y > v[i].vertex.y) \ && (v[NEXT_INDEX(i, n)].vertex.y >= v[i].vertex.y))
{add_vertex(&((e)->outp[(p)]->v[(s)]), x, y); \ (e)->outp[(p)]->active++;}
typedef struct bbox_shape bbox |
typedef struct edge_shape edge_node |
typedef struct p_shape polygon_node |
typedef struct sbt_t_shape sb_tree |
typedef struct v_shape vertex_node |
enum bundle_state |
enum vertex_type |
static void add_edge_to_aet | ( | edge_node ** | aet, |
edge_node * | edge, | ||
edge_node * | prev | ||
) | [static] |
static void add_intersection | ( | it_node ** | it, |
edge_node * | edge0, | ||
edge_node * | edge1, | ||
double | x, | ||
double | y | ||
) | [static] |
static void add_left | ( | polygon_node * | p, |
double | x, | ||
double | y | ||
) | [static] |
static void add_local_min | ( | polygon_node ** | p, |
edge_node * | edge, | ||
double | x, | ||
double | y | ||
) | [static] |
static void add_right | ( | polygon_node * | p, |
double | x, | ||
double | y | ||
) | [static] |
static void add_st_edge | ( | st_node ** | st, |
it_node ** | it, | ||
edge_node * | edge, | ||
double | dy | ||
) | [static] |
static void add_to_sbtree | ( | int * | entries, |
sb_tree ** | sbtree, | ||
double | y | ||
) | [static] |
static void add_vertex | ( | vertex_node ** | t, |
double | x, | ||
double | y | ||
) | [static] |
static edge_node** bound_list | ( | lmt_node ** | lmt, |
double | y | ||
) | [static] |
static void build_intersection_table | ( | it_node ** | it, |
edge_node * | aet, | ||
double | dy | ||
) | [static] |
static int count_contours | ( | polygon_node * | polygon | ) | [static] |
static int count_optimal_vertices | ( | gpc_vertex_list | c | ) | [static] |
static int count_tristrips | ( | polygon_node * | tn | ) | [static] |
static bbox* create_contour_bboxes | ( | gpc_polygon * | p | ) | [static] |
static void free_sbtree | ( | sb_tree ** | sbtree | ) | [static] |
void gpc_add_contour | ( | gpc_polygon * | p, |
gpc_vertex_list * | new_contour, | ||
int | hole | ||
) |
void gpc_free_polygon | ( | gpc_polygon * | p | ) |
void gpc_free_tristrip | ( | gpc_tristrip * | t | ) |
void gpc_polygon_clip | ( | gpc_op | op, |
gpc_polygon * | subj, | ||
gpc_polygon * | clip, | ||
gpc_polygon * | result | ||
) |
void gpc_polygon_to_tristrip | ( | gpc_polygon * | s, |
gpc_tristrip * | t | ||
) |
void gpc_read_polygon | ( | FILE * | fp, |
int | read_hole_flags, | ||
gpc_polygon * | p | ||
) |
void gpc_tristrip_clip | ( | gpc_op | op, |
gpc_polygon * | subj, | ||
gpc_polygon * | clip, | ||
gpc_tristrip * | result | ||
) |
void gpc_write_polygon | ( | FILE * | fp, |
int | write_hole_flags, | ||
gpc_polygon * | p | ||
) |
static void insert_bound | ( | edge_node ** | b, |
edge_node * | e | ||
) | [static] |
static void merge_left | ( | polygon_node * | p, |
polygon_node * | q, | ||
polygon_node * | list | ||
) | [static] |
static void merge_right | ( | polygon_node * | p, |
polygon_node * | q, | ||
polygon_node * | list | ||
) | [static] |
static void minimax_test | ( | gpc_polygon * | subj, |
gpc_polygon * | clip, | ||
gpc_op | op | ||
) | [static] |
static void new_tristrip | ( | polygon_node ** | tn, |
edge_node * | edge, | ||
double | x, | ||
double | y | ||
) | [static] |