Graphviz 13.0.0~dev.20241220.2304
Loading...
Searching...
No Matches
simple.h File Reference
#include <stddef.h>
Include dependency graph for simple.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  position
 
struct  vertex
 
struct  polygon
 
struct  intersection
 
struct  active_edge
 
struct  active_edge_list
 
struct  data
 

Macros

#define MAXINTS
 
#define SLOPE(p, q)   ( ( ( p.y ) - ( q.y ) ) / ( ( p.x ) - ( q.x ) ) )
 
#define MAX(a, b)   ( ( a ) > ( b ) ? ( a ) : ( b ) )
 
#define after(v)   (((v)==((v)->poly->finish))?((v)->poly->start):((v)+1))
 
#define prior(v)   (((v)==((v)->poly->start))?((v)->poly->finish):((v)-1))
 

Functions

void find_ints (struct vertex vertex_list[], struct data *input, struct intersection ilist[])
 
void find_intersection (struct vertex *l, struct vertex *m, struct intersection ilist[], struct data *input)
 detect whether lines l and m intersect
 

Macro Definition Documentation

◆ after

#define after (   v)    (((v)==((v)->poly->finish))?((v)->poly->start):((v)+1))

Definition at line 18 of file simple.h.

◆ MAX

#define MAX (   a,
 
)    ( ( a ) > ( b ) ? ( a ) : ( b ) )

Definition at line 16 of file simple.h.

◆ MAXINTS

#define MAXINTS
Value:
10000 /* modify this line to reflect the max no. of
intersections you want reported -- 50000 seems to break the program */

Definition at line 13 of file simple.h.

◆ prior

#define prior (   v)    (((v)==((v)->poly->start))?((v)->poly->finish):((v)-1))

Definition at line 19 of file simple.h.

◆ SLOPE

#define SLOPE (   p,
 
)    ( ( ( p.y ) - ( q.y ) ) / ( ( p.x ) - ( q.x ) ) )

Definition at line 15 of file simple.h.

Function Documentation

◆ find_intersection()

void find_intersection ( struct vertex l,
struct vertex m,
struct intersection  ilist[],
struct data input 
)

Definition at line 159 of file intersect.c.

References intersection::firstp, intersection::firstv, graphviz_exit(), intpoint(), MAX, MAXINTS, data::ninters, online(), vertex::poly, intersection::secondp, intersection::secondv, sgnarea(), position::x, intersection::x, position::y, and intersection::y.

Here is the call graph for this function:

◆ find_ints()

void find_ints ( struct vertex  vertex_list[],
struct data input,
struct intersection  ilist[] 
)

Definition at line 19 of file find_ints.c.

References vertex::active, after, active_edge_list::final, find_intersection(), active_edge_list::first, free(), graphviz_exit(), gt(), gv_alloc(), gv_calloc(), active_edge::last, active_edge::name, active_edge::next, data::ninters, NULL, active_edge_list::number, data::nvertices, and prior.

Here is the call graph for this function: