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

Go to the source code of this file.

Macros

#define TRI_API   /* nothing */
 

Typedefs

typedef Ppoint_t(* indexer_t) (void *base, size_t index)
 

Enumerations

enum  { ISCCW = 1 , ISCW = 2 , ISON = 3 }
 return value from ccw More...
 

Functions

TRI_API int Ptriangulate (Ppoly_t *polygon, void(*fn)(void *closure, const Ppoint_t tri[]), void *vc)
 
int ccw (Ppoint_t p1, Ppoint_t p2, Ppoint_t p3)
 are the given points counter-clockwise, clockwise, or co-linear?
 
bool between (Ppoint_t pa, Ppoint_t pb, Ppoint_t pc)
 is pb between pa and pc?
 
bool intersects (Ppoint_t pa, Ppoint_t pb, Ppoint_t pc, Ppoint_t pd)
 line to line intersection
 
bool isdiagonal (size_t i, size_t ip2, void *pointp, size_t pointn, indexer_t indexer)
 is (i, i + 2) a diagonal?
 

Macro Definition Documentation

◆ TRI_API

#define TRI_API   /* nothing */

Definition at line 29 of file tri.h.

Typedef Documentation

◆ indexer_t

typedef Ppoint_t(* indexer_t) (void *base, size_t index)

Definition at line 55 of file tri.h.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
ISCCW 

counter-clockwise

ISCW 

clockwise

ISON 

co-linear

Definition at line 40 of file tri.h.

Function Documentation

◆ between()

bool between ( Ppoint_t  pa,
Ppoint_t  pb,
Ppoint_t  pc 
)

Definition at line 139 of file triang.c.

References ccw(), ISON, Pxy_t::x, and Pxy_t::y.

Referenced by intersects().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ccw()

int ccw ( Ppoint_t  p1,
Ppoint_t  p2,
Ppoint_t  p3 
)

Definition at line 23 of file triang.c.

References ISCCW, ISCW, ISON, Pxy_t::x, and Pxy_t::y.

Referenced by between(), convert(), finddqsplit(), intersects(), isdiagonal(), pointintri(), and Pshortestpath().

Here is the caller graph for this function:

◆ intersects()

bool intersects ( Ppoint_t  pa,
Ppoint_t  pb,
Ppoint_t  pc,
Ppoint_t  pd 
)

Definition at line 121 of file triang.c.

References between(), ccw(), ISCCW, and ISON.

Referenced by isdiagonal().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ isdiagonal()

bool isdiagonal ( size_t  i,
size_t  ip2,
void *  pointp,
size_t  pointn,
indexer_t  indexer 
)

Definition at line 91 of file triang.c.

References ccw(), intersects(), ISCCW, and ISCW.

Referenced by triangulate(), and triangulate().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Ptriangulate()

TRI_API int Ptriangulate ( Ppoly_t polygon,
void(*)(void *closure, const Ppoint_t tri[])  fn,
void *  vc 
)

Referenced by vgpanecmd().

Here is the caller graph for this function: