Logo ROOT  
Reference Guide
triangle.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <stdint.h>
#include "triangle.h"
Include dependency graph for triangle.c:

Classes

struct  badsubseg
 
struct  badtriang
 
struct  behavior
 
struct  event
 
struct  flipstacker
 
struct  memorypool
 
struct  mesh
 
struct  osub
 
struct  otri
 
struct  splaynode
 

Macros

#define Absolute(a)   ((a) >= 0.0 ? (a) : -(a))
  More...
 
#define apex(otri, vertexptr)    vertexptr = (vertex) (otri).tri[(otri).orient + 3]
  More...
 
#define areabound(otri)   ((REAL *) (otri).tri)[m->areaboundindex]
  More...
 
#define BADSUBSEGPERBLOCK   252
  More...
 
#define BADTRIPERBLOCK   4092
  More...
 
#define bond(otri1, otri2)
  More...
 
#define CDT_ONLY
  More...
 
#define deadsubseg(sub)   ((sub)[1] == (subseg) NULL)
  More...
 
#define deadtri(tria)   ((tria)[1] == (triangle) NULL)
  More...
 
#define DEADVERTEX   -32768
  More...
 
#define decode(ptr, otri)
  More...
 
#define dest(otri, vertexptr)    vertexptr = (vertex) (otri).tri[minus1mod3[(otri).orient] + 3]
  More...
 
#define dissolve(otri)    (otri).tri[(otri).orient] = (triangle) m->dummytri
  More...
 
#define dnext(otri1, otri2)
  More...
 
#define dnextself(otri)
  More...
 
#define dprev(otri1, otri2)
  More...
 
#define dprevself(otri)
  More...
 
#define elemattribute(otri, attnum)    ((REAL *) (otri).tri)[m->elemattribindex + (attnum)]
  More...
 
#define encode(otri)    (triangle) ((uintptr_t) (otri).tri | (uintptr_t) (otri).orient)
  More...
 
#define Fast_Two_Sum(a, b, x, y)
  More...
 
#define Fast_Two_Sum_Tail(a, b, x, y)
  More...
 
#define FILENAMESIZE   2048
  More...
 
#define FLIPSTACKERPERBLOCK   252
  More...
 
#define FREEVERTEX   2
  More...
 
#define INEXACT   /* Nothing */
  More...
 
#define infect(otri)
  More...
 
#define infected(otri)    (((uintptr_t) (otri).tri[6] & (uintptr_t) 2l) != 0l)
  More...
 
#define INPUTLINESIZE   1024
  More...
 
#define INPUTVERTEX   0
  More...
 
#define killsubseg(sub)
  More...
 
#define killtri(tria)
  More...
 
#define lnext(otri1, otri2)
  More...
 
#define lnextself(otri)    (otri).orient = plus1mod3[(otri).orient]
  More...
 
#define lprev(otri1, otri2)
  More...
 
#define lprevself(otri)    (otri).orient = minus1mod3[(otri).orient]
  More...
 
#define mark(osub)   (* (int *) ((osub).ss + 8))
  More...
 
#define NO_TIMER
  More...
 
#define ONETHIRD   0.333333333333333333333333333333333333333333333333333333333333
  More...
 
#define onext(otri1, otri2)
  More...
 
#define onextself(otri)
  More...
 
#define oprev(otri1, otri2)
  More...
 
#define oprevself(otri)
  More...
 
#define org(otri, vertexptr)    vertexptr = (vertex) (otri).tri[plus1mod3[(otri).orient] + 3]
  More...
 
#define otricopy(otri1, otri2)
  More...
 
#define otriequal(otri1, otri2)
  More...
 
#define PI   3.141592653589793238462643383279502884197169399375105820974944592308
  More...
 
#define REDUCED
  More...
 
#define rnext(otri1, otri2)
  More...
 
#define rnextself(otri)
  More...
 
#define rprev(otri1, otri2)
  More...
 
#define rprevself(otri)
  More...
 
#define SAMPLEFACTOR   11
  More...
 
#define SAMPLERATE   10
  More...
 
#define sbond(osub1, osub2)
  More...
 
#define sdecode(sptr, osub)
  More...
 
#define sdest(osub, vertexptr)    vertexptr = (vertex) (osub).ss[3 - (osub).ssorient]
  More...
 
#define sdissolve(osub)    (osub).ss[(osub).ssorient] = (subseg) m->dummysub
  More...
 
#define segdest(osub, vertexptr)    vertexptr = (vertex) (osub).ss[5 - (osub).ssorient]
  More...
 
#define SEGMENTVERTEX   1
  More...
 
#define segorg(osub, vertexptr)    vertexptr = (vertex) (osub).ss[4 + (osub).ssorient]
  More...
 
#define sencode(osub)    (subseg) ((uintptr_t) (osub).ss | (uintptr_t) (osub).ssorient)
  More...
 
#define setapex(otri, vertexptr)    (otri).tri[(otri).orient + 3] = (triangle) vertexptr
  More...
 
#define setareabound(otri, value)    ((REAL *) (otri).tri)[m->areaboundindex] = value
  More...
 
#define setdest(otri, vertexptr)    (otri).tri[minus1mod3[(otri).orient] + 3] = (triangle) vertexptr
  More...
 
#define setelemattribute(otri, attnum, value)    ((REAL *) (otri).tri)[m->elemattribindex + (attnum)] = value
  More...
 
#define setmark(osub, value)    * (int *) ((osub).ss + 8) = value
  More...
 
#define setorg(otri, vertexptr)    (otri).tri[plus1mod3[(otri).orient] + 3] = (triangle) vertexptr
  More...
 
#define setsdest(osub, vertexptr)    (osub).ss[3 - (osub).ssorient] = (subseg) vertexptr
  More...
 
#define setsegdest(osub, vertexptr)    (osub).ss[5 - (osub).ssorient] = (subseg) vertexptr
  More...
 
#define setsegorg(osub, vertexptr)    (osub).ss[4 + (osub).ssorient] = (subseg) vertexptr
  More...
 
#define setsorg(osub, vertexptr)    (osub).ss[2 + (osub).ssorient] = (subseg) vertexptr
  More...
 
#define setvertex2tri(vx, value)    ((triangle *) (vx))[m->vertex2triindex] = value
  More...
 
#define setvertexmark(vx, value)    ((int *) (vx))[m->vertexmarkindex] = value
  More...
 
#define setvertextype(vx, value)    ((int *) (vx))[m->vertexmarkindex + 1] = value
  More...
 
#define snext(osub1, osub2)
  More...
 
#define snextself(osub)
  More...
 
#define sorg(osub, vertexptr)    vertexptr = (vertex) (osub).ss[2 + (osub).ssorient]
  More...
 
#define spivot(osub1, osub2)
  More...
 
#define spivotself(osub)
  More...
 
#define SPLAYNODEPERBLOCK   508
  More...
 
#define Split(a, ahi, alo)
  More...
 
#define Square(a, x, y)
  More...
 
#define Square_Tail(a, x, y)
  More...
 
#define SQUAREROOTTWO   1.4142135623730950488016887242096980785696718753769480732
  More...
 
#define ssym(osub1, osub2)
  More...
 
#define ssymself(osub)    (osub).ssorient = 1 - (osub).ssorient
  More...
 
#define STARTINDEX   0
  More...
 
#define stdissolve(osub)    (osub).ss[6 + (osub).ssorient] = (subseg) m->dummytri
  More...
 
#define stpivot(osub, otri)
  More...
 
#define subsegcopy(osub1, osub2)
  More...
 
#define subsegequal(osub1, osub2)
  More...
 
#define SUBSEGPERBLOCK   508 /* Number of subsegments allocated at once. */
  More...
 
#define sym(otri1, otri2)
  More...
 
#define symself(otri)
  More...
 
#define TRILIBRARY
  More...
 
#define TRIPERBLOCK   4092 /* Number of triangles allocated at once. */
  More...
 
#define tsbond(otri, osub)
  More...
 
#define tsdissolve(otri)    (otri).tri[6 + (otri).orient] = (triangle) m->dummysub
  More...
 
#define tspivot(otri, osub)
  More...
 
#define Two_Diff(a, b, x, y)
  More...
 
#define Two_Diff_Tail(a, b, x, y)
  More...
 
#define Two_One_Diff(a1, a0, b, x2, x1, x0)
  More...
 
#define Two_One_Product(a1, a0, b, x3, x2, x1, x0)
  More...
 
#define Two_One_Sum(a1, a0, b, x2, x1, x0)
  More...
 
#define Two_Product(a, b, x, y)
  More...
 
#define Two_Product_Presplit(a, b, bhi, blo, x, y)
  More...
 
#define Two_Product_Tail(a, b, x, y)
  More...
 
#define Two_Sum(a, b, x, y)
  More...
 
#define Two_Sum_Tail(a, b, x, y)
  More...
 
#define Two_Two_Diff(a1, a0, b1, b0, x3, x2, x1, x0)
  More...
 
#define Two_Two_Sum(a1, a0, b1, b0, x3, x2, x1, x0)
  More...
 
#define UNDEADVERTEX   -32767
  More...
 
#define uninfect(otri)
  More...
 
#define vertex2tri(vx)   ((triangle *) (vx))[m->vertex2triindex]
  More...
 
#define vertexmark(vx)   ((int *) (vx))[m->vertexmarkindex]
  More...
 
#define VERTEXPERBLOCK   4092 /* Number of vertices allocated at once. */
  More...
 
#define vertextype(vx)   ((int *) (vx))[m->vertexmarkindex + 1]
  More...
 
#define VIRUSPERBLOCK   1020 /* Number of virus triangles allocated at once. */
  More...
 

Typedefs

typedef REAL ** subseg
  More...
 
typedef REAL ** triangle
  More...
 
typedef REALvertex
  More...
 

Enumerations

enum  finddirectionresult { WITHIN , LEFTCOLLINEAR , RIGHTCOLLINEAR }
 
enum  insertvertexresult { SUCCESSFULVERTEX , ENCROACHINGVERTEX , VIOLATINGVERTEX , DUPLICATEVERTEX }
 
enum  locateresult { INTRIANGLE , ONEDGE , ONVERTEX , OUTSIDE }
 

Functions

void alternateaxes (vertex *sortarray, int arraysize, int axis)
  More...
 
void carveholes (struct mesh *m, struct behavior *b, REAL *holelist, int holes, REAL *regionlist, int regions)
  More...
 
void constrainededge (struct mesh *m, struct behavior *b, struct otri *starttri, vertex endpoint2, int newmark)
  More...
 
REAL counterclockwise (struct mesh *m, struct behavior *b, vertex pa, vertex pb, vertex pc)
  More...
 
REAL counterclockwiseadapt (vertex pa, vertex pb, vertex pc, REAL detsum)
  More...
 
long delaunay (struct mesh *m, struct behavior *b)
  More...
 
void delaunayfixup (struct mesh *m, struct behavior *b, struct otri *fixuptri, int leftside)
  More...
 
long divconqdelaunay (struct mesh *m, struct behavior *b)
  More...
 
void divconqrecurse (struct mesh *m, struct behavior *b, vertex *sortarray, int vertices, int axis, struct otri *farleft, struct otri *farright)
  More...
 
void dummyinit (struct mesh *m, struct behavior *b, int trianglebytes, int subsegbytes)
  More...
 
REAL estimate (int elen, REAL *e)
  More...
 
void exactinit ()
  More...
 
int fast_expansion_sum_zeroelim (int elen, REAL *e, int flen, REAL *f, REAL *h)
  More...
 
void findcircumcenter (struct mesh *m, struct behavior *b, vertex torg, vertex tdest, vertex tapex, vertex circumcenter, REAL *xi, REAL *eta, int offcenter)
  More...
 
enum finddirectionresult finddirection (struct mesh *m, struct behavior *b, struct otri *searchtri, vertex searchpoint)
  More...
 
void flip (struct mesh *m, struct behavior *b, struct otri *flipedge)
  More...
 
void formskeleton (struct mesh *m, struct behavior *b, int *segmentlist, int *segmentmarkerlist, int numberofsegments)
  More...
 
vertex getvertex (struct mesh *m, struct behavior *b, int number)
  More...
 
void highorder (struct mesh *m, struct behavior *b)
  More...
 
REAL incircle (struct mesh *m, struct behavior *b, vertex pa, vertex pb, vertex pc, vertex pd)
  More...
 
REAL incircleadapt (vertex pa, vertex pb, vertex pc, vertex pd, REAL permanent)
  More...
 
void infecthull (struct mesh *m, struct behavior *b)
  More...
 
void initializetrisubpools (struct mesh *m, struct behavior *b)
  More...
 
void initializevertexpool (struct mesh *m, struct behavior *b)
  More...
 
void insertsegment (struct mesh *m, struct behavior *b, vertex endpoint1, vertex endpoint2, int newmark)
  More...
 
void insertsubseg (struct mesh *m, struct behavior *b, struct otri *tri, int subsegmark)
  More...
 
enum insertvertexresult insertvertex (struct mesh *m, struct behavior *b, vertex newvertex, struct otri *searchtri, struct osub *splitseg, int segmentflaws, int triflaws)
  More...
 
void internalerror ()
  More...
 
enum locateresult locate (struct mesh *m, struct behavior *b, vertex searchpoint, struct otri *searchtri)
  More...
 
void makesubseg (struct mesh *m, struct osub *newsubseg)
  More...
 
void maketriangle (struct mesh *m, struct behavior *b, struct otri *newotri)
  More...
 
void makevertexmap (struct mesh *m, struct behavior *b)
  More...
 
void markhull (struct mesh *m, struct behavior *b)
  More...
 
void mergehulls (struct mesh *m, struct behavior *b, struct otri *farleft, struct otri *innerleft, struct otri *innerright, struct otri *farright, int axis)
  More...
 
REAL nonregular (struct mesh *m, struct behavior *b, vertex pa, vertex pb, vertex pc, vertex pd)
  More...
 
void numbernodes (struct mesh *m, struct behavior *b)
  More...
 
REAL orient3d (struct mesh *m, struct behavior *b, vertex pa, vertex pb, vertex pc, vertex pd, REAL aheight, REAL bheight, REAL cheight, REAL dheight)
  More...
 
REAL orient3dadapt (vertex pa, vertex pb, vertex pc, vertex pd, REAL aheight, REAL bheight, REAL cheight, REAL dheight, REAL permanent)
  More...
 
void parsecommandline (int argc, char **argv, struct behavior *b)
  More...
 
void plague (struct mesh *m, struct behavior *b)
  More...
 
VOIDpoolalloc (struct memorypool *pool)
  More...
 
void pooldealloc (struct memorypool *pool, VOID *dyingitem)
  More...
 
void pooldeinit (struct memorypool *pool)
  More...
 
void poolinit (struct memorypool *pool, int bytecount, int itemcount, int firstitemcount, int alignment)
  More...
 
void poolrestart (struct memorypool *pool)
  More...
 
void poolzero (struct memorypool *pool)
  More...
 
enum locateresult preciselocate (struct mesh *m, struct behavior *b, vertex searchpoint, struct otri *searchtri, int stopatsubsegment)
  More...
 
void printsubseg (struct mesh *m, struct behavior *b, struct osub *s)
  More...
 
void printtriangle (struct mesh *m, struct behavior *b, struct otri *t)
  More...
 
void quality_statistics (struct mesh *m, struct behavior *b)
  More...
 
uintptr_t randomnation (unsigned int choices)
  More...
 
void regionplague (struct mesh *m, struct behavior *b, REAL attribute, REAL area)
  More...
 
long removeghosts (struct mesh *m, struct behavior *b, struct otri *startghost)
  More...
 
int scale_expansion_zeroelim (int elen, REAL *e, REAL b, REAL *h)
  More...
 
int scoutsegment (struct mesh *m, struct behavior *b, struct otri *searchtri, vertex endpoint2, int newmark)
  More...
 
void segmentintersection (struct mesh *m, struct behavior *b, struct otri *splittri, struct osub *splitsubseg, vertex endpoint2)
  More...
 
void statistics (struct mesh *m, struct behavior *b)
  More...
 
void subsegdealloc (struct mesh *m, subseg *dyingsubseg)
  More...
 
subsegsubsegtraverse (struct mesh *m)
  More...
 
void transfernodes (struct mesh *m, struct behavior *b, REAL *pointlist, REAL *pointattriblist, int *pointmarkerlist, int numberofpoints, int numberofpointattribs)
  More...
 
void traversalinit (struct memorypool *pool)
  More...
 
VOIDtraverse (struct memorypool *pool)
  More...
 
void triangledealloc (struct mesh *m, triangle *dyingtriangle)
  More...
 
void triangledeinit (struct mesh *m, struct behavior *b)
  More...
 
void triangleinit (struct mesh *m)
  More...
 
triangletriangletraverse (struct mesh *m)
  More...
 
void triangulate (char *triswitches, struct triangulateio *in, struct triangulateio *out, struct triangulateio *vorout)
  More...
 
void triangulatepolygon (struct mesh *m, struct behavior *b, struct otri *firstedge, struct otri *lastedge, int edgecount, int doflip, int triflaws)
  More...
 
void triexit (int status)
  More...
 
void trifree (VOID *memptr)
  More...
 
VOIDtrimalloc (int size)
  More...
 
int triunsuitable (vertex triorg, vertex tridest, vertex triapex, REAL area)
  More...
 
void unflip (struct mesh *m, struct behavior *b, struct otri *flipedge)
  More...
 
void vertexdealloc (struct mesh *m, vertex dyingvertex)
  More...
 
void vertexmedian (vertex *sortarray, int arraysize, int median, int axis)
  More...
 
void vertexsort (vertex *sortarray, int arraysize)
  More...
 
vertex vertextraverse (struct mesh *m)
  More...
 
void writeedges (struct mesh *m, struct behavior *b, int **edgelist, int **edgemarkerlist)
  More...
 
void writeelements (struct mesh *m, struct behavior *b, int **trianglelist, REAL **triangleattriblist)
  More...
 
void writeneighbors (struct mesh *m, struct behavior *b, int **neighborlist)
  More...
 
void writenodes (struct mesh *m, struct behavior *b, REAL **pointlist, REAL **pointattriblist, int **pointmarkerlist)
  More...
 
void writepoly (struct mesh *m, struct behavior *b, int **segmentlist, int **segmentmarkerlist)
  More...
 
void writevoronoi (struct mesh *m, struct behavior *b, REAL **vpointlist, REAL **vpointattriblist, int **vpointmarkerlist, int **vedgelist, int **vedgemarkerlist, REAL **vnormlist)
  More...
 

Variables

REAL ccwerrboundA
  More...
 
REAL ccwerrboundB
  More...
 
REAL ccwerrboundC
  More...
 
REAL epsilon
  More...
 
REAL iccerrboundA
  More...
 
REAL iccerrboundB
  More...
 
REAL iccerrboundC
  More...
 
int minus1mod3 [3] = {2, 0, 1}
  More...
 
REAL o3derrboundA
  More...
 
REAL o3derrboundB
  More...
 
REAL o3derrboundC
  More...
 
int plus1mod3 [3] = {1, 2, 0}
  More...
 
uintptr_t randomseed
  More...
 
REAL resulterrbound
  More...
 
REAL splitter
  More...
 

Macro Definition Documentation

◆ Absolute

#define Absolute (   a)    ((a) >= 0.0 ? (a) : -(a))

Definition at line 4730 of file triangle.c.

◆ apex

#define apex (   otri,
  vertexptr 
)     vertexptr = (vertex) (otri).tri[(otri).orient + 3]

Definition at line 1044 of file triangle.c.

◆ areabound

#define areabound (   otri)    ((REAL *) (otri).tri)[m->areaboundindex]

Definition at line 1108 of file triangle.c.

◆ BADSUBSEGPERBLOCK

#define BADSUBSEGPERBLOCK   252

Definition at line 271 of file triangle.c.

◆ BADTRIPERBLOCK

#define BADTRIPERBLOCK   4092

Definition at line 273 of file triangle.c.

◆ bond

#define bond (   otri1,
  otri2 
)
Value:
(otri1).tri[(otri1).orient] = encode(otri2); \
(otri2).tri[(otri2).orient] = encode(otri1)
#define encode(otri)
Definition: triangle.c:922

Definition at line 1058 of file triangle.c.

◆ CDT_ONLY

#define CDT_ONLY

Definition at line 227 of file triangle.c.

◆ deadsubseg

#define deadsubseg (   sub)    ((sub)[1] == (subseg) NULL)

Definition at line 1241 of file triangle.c.

◆ deadtri

#define deadtri (   tria)    ((tria)[1] == (triangle) NULL)

Definition at line 1118 of file triangle.c.

◆ DEADVERTEX

#define DEADVERTEX   -32768

Definition at line 286 of file triangle.c.

◆ decode

#define decode (   ptr,
  otri 
)
Value:
(otri).orient = (int) ((uintptr_t) (ptr) & (uintptr_t) 3l); \
(otri).tri = (triangle *) \
((uintptr_t) (ptr) ^ (uintptr_t) (otri).orient)
Definition: triangle.c:486
REAL ** triangle
Definition: triangle.c:479

Definition at line 913 of file triangle.c.

◆ dest

#define dest (   otri,
  vertexptr 
)     vertexptr = (vertex) (otri).tri[minus1mod3[(otri).orient] + 3]

Definition at line 1041 of file triangle.c.

◆ dissolve

#define dissolve (   otri)     (otri).tri[(otri).orient] = (triangle) m->dummytri

Definition at line 1067 of file triangle.c.

◆ dnext

#define dnext (   otri1,
  otri2 
)
Value:
sym(otri1, otri2); \
lprevself(otri2);
#define sym(otri1, otri2)
Definition: triangle.c:933

Definition at line 987 of file triangle.c.

◆ dnextself

#define dnextself (   otri)
Value:
lprevself(otri);
#define symself(otri)
Definition: triangle.c:937

Definition at line 991 of file triangle.c.

◆ dprev

#define dprev (   otri1,
  otri2 
)
Value:
lnext(otri1, otri2); \
symself(otri2);
#define lnext(otri1, otri2)
Definition: triangle.c:943

Definition at line 999 of file triangle.c.

◆ dprevself

#define dprevself (   otri)
Value:
symself(otri);
#define lnextself(otri)
Definition: triangle.c:947

Definition at line 1003 of file triangle.c.

◆ elemattribute

#define elemattribute (   otri,
  attnum 
)     ((REAL *) (otri).tri)[m->elemattribindex + (attnum)]

Definition at line 1100 of file triangle.c.

◆ encode

#define encode (   otri)     (triangle) ((uintptr_t) (otri).tri | (uintptr_t) (otri).orient)

Definition at line 922 of file triangle.c.

◆ Fast_Two_Sum

#define Fast_Two_Sum (   a,
  b,
  x,
  y 
)
Value:
x = (REAL) (a + b); \
Fast_Two_Sum_Tail(a, b, x, y)
#define b(i)
Definition: RSha256.hxx:100
Double_t y[n]
Definition: legend1.C:17
Double_t x[n]
Definition: legend1.C:17
auto * a
Definition: textangle.C:12
#define REAL
Definition: triangle.h:277

Definition at line 4750 of file triangle.c.

◆ Fast_Two_Sum_Tail

#define Fast_Two_Sum_Tail (   a,
  b,
  x,
  y 
)
Value:
bvirt = x - a; \
y = b - bvirt

Definition at line 4746 of file triangle.c.

◆ FILENAMESIZE

#define FILENAMESIZE   2048

Definition at line 255 of file triangle.c.

◆ FLIPSTACKERPERBLOCK

#define FLIPSTACKERPERBLOCK   252

Definition at line 275 of file triangle.c.

◆ FREEVERTEX

#define FREEVERTEX   2

Definition at line 285 of file triangle.c.

◆ INEXACT

#define INEXACT   /* Nothing */

Definition at line 250 of file triangle.c.

◆ infect

#define infect (   otri)
Value:
(otri).tri[6] = (triangle) \
((uintptr_t) (otri).tri[6] | (uintptr_t) 2l)

Definition at line 1085 of file triangle.c.

◆ infected

#define infected (   otri)     (((uintptr_t) (otri).tri[6] & (uintptr_t) 2l) != 0l)

Definition at line 1095 of file triangle.c.

◆ INPUTLINESIZE

#define INPUTLINESIZE   1024

Definition at line 260 of file triangle.c.

◆ INPUTVERTEX

#define INPUTVERTEX   0

Definition at line 283 of file triangle.c.

◆ killsubseg

#define killsubseg (   sub)
Value:
(sub)[1] = (subseg) NULL; \
(sub)[2] = (subseg) NULL
REAL ** subseg
Definition: triangle.c:496

Definition at line 1243 of file triangle.c.

◆ killtri

#define killtri (   tria)
Value:
(tria)[1] = (triangle) NULL; \
(tria)[3] = (triangle) NULL

Definition at line 1120 of file triangle.c.

◆ lnext

#define lnext (   otri1,
  otri2 
)
Value:
(otri2).tri = (otri1).tri; \
(otri2).orient = plus1mod3[(otri1).orient]
int plus1mod3[3]
Definition: triangle.c:903

Definition at line 943 of file triangle.c.

◆ lnextself

#define lnextself (   otri)     (otri).orient = plus1mod3[(otri).orient]

Definition at line 947 of file triangle.c.

◆ lprev

#define lprev (   otri1,
  otri2 
)
Value:
(otri2).tri = (otri1).tri; \
(otri2).orient = minus1mod3[(otri1).orient]
int minus1mod3[3]
Definition: triangle.c:904

Definition at line 952 of file triangle.c.

◆ lprevself

#define lprevself (   otri)     (otri).orient = minus1mod3[(otri).orient]

Definition at line 956 of file triangle.c.

◆ mark

#define mark (   osub)    (* (int *) ((osub).ss + 8))

Definition at line 1207 of file triangle.c.

◆ NO_TIMER

#define NO_TIMER

Definition at line 200 of file triangle.c.

◆ ONETHIRD

#define ONETHIRD   0.333333333333333333333333333333333333333333333333333333333333

Definition at line 313 of file triangle.c.

◆ onext

#define onext (   otri1,
  otri2 
)
Value:
lprev(otri1, otri2); \
symself(otri2);
#define lprev(otri1, otri2)
Definition: triangle.c:952

Definition at line 963 of file triangle.c.

◆ onextself

#define onextself (   otri)
Value:
symself(otri);
#define lprevself(otri)
Definition: triangle.c:956

Definition at line 967 of file triangle.c.

◆ oprev

#define oprev (   otri1,
  otri2 
)
Value:
sym(otri1, otri2); \
lnextself(otri2);

Definition at line 975 of file triangle.c.

◆ oprevself

#define oprevself (   otri)
Value:
lnextself(otri);

Definition at line 979 of file triangle.c.

◆ org

#define org (   otri,
  vertexptr 
)     vertexptr = (vertex) (otri).tri[plus1mod3[(otri).orient] + 3]

Definition at line 1038 of file triangle.c.

◆ otricopy

#define otricopy (   otri1,
  otri2 
)
Value:
(otri2).tri = (otri1).tri; \
(otri2).orient = (otri1).orient

Definition at line 1072 of file triangle.c.

◆ otriequal

#define otriequal (   otri1,
  otri2 
)
Value:
(((otri1).tri == (otri2).tri) && \
((otri1).orient == (otri2).orient))

Definition at line 1078 of file triangle.c.

◆ PI

#define PI   3.141592653589793238462643383279502884197169399375105820974944592308

Definition at line 305 of file triangle.c.

◆ REDUCED

#define REDUCED

Definition at line 226 of file triangle.c.

◆ rnext

#define rnext (   otri1,
  otri2 
)
Value:
sym(otri1, otri2); \
lnextself(otri2); \
symself(otri2);

Definition at line 1011 of file triangle.c.

◆ rnextself

#define rnextself (   otri)
Value:
lnextself(otri); \
symself(otri);

Definition at line 1016 of file triangle.c.

◆ rprev

#define rprev (   otri1,
  otri2 
)
Value:
sym(otri1, otri2); \
lprevself(otri2); \
symself(otri2);

Definition at line 1025 of file triangle.c.

◆ rprevself

#define rprevself (   otri)
Value:
lprevself(otri); \
symself(otri);

Definition at line 1030 of file triangle.c.

◆ SAMPLEFACTOR

#define SAMPLEFACTOR   11

Definition at line 295 of file triangle.c.

◆ SAMPLERATE

#define SAMPLERATE   10

Definition at line 301 of file triangle.c.

◆ sbond

#define sbond (   osub1,
  osub2 
)
Value:
(osub1).ss[(osub1).ssorient] = sencode(osub2); \
(osub2).ss[(osub2).ssorient] = sencode(osub1)
#define sencode(osub)
Definition: triangle.c:1142

Definition at line 1214 of file triangle.c.

◆ sdecode

#define sdecode (   sptr,
  osub 
)
Value:
(osub).ssorient = (int) ((uintptr_t) (sptr) & (uintptr_t) 1l); \
(osub).ss = (subseg *) \
((uintptr_t) (sptr) & ~ (uintptr_t) 3l)
Definition: triangle.c:503

Definition at line 1133 of file triangle.c.

◆ sdest

#define sdest (   osub,
  vertexptr 
)     vertexptr = (vertex) (osub).ss[3 - (osub).ssorient]

Definition at line 1182 of file triangle.c.

◆ sdissolve

#define sdissolve (   osub)     (osub).ss[(osub).ssorient] = (subseg) m->dummysub

Definition at line 1221 of file triangle.c.

◆ segdest

#define segdest (   osub,
  vertexptr 
)     vertexptr = (vertex) (osub).ss[5 - (osub).ssorient]

Definition at line 1194 of file triangle.c.

◆ SEGMENTVERTEX

#define SEGMENTVERTEX   1

Definition at line 284 of file triangle.c.

◆ segorg

#define segorg (   osub,
  vertexptr 
)     vertexptr = (vertex) (osub).ss[4 + (osub).ssorient]

Definition at line 1191 of file triangle.c.

◆ sencode

#define sencode (   osub)     (subseg) ((uintptr_t) (osub).ss | (uintptr_t) (osub).ssorient)

Definition at line 1142 of file triangle.c.

◆ setapex

#define setapex (   otri,
  vertexptr 
)     (otri).tri[(otri).orient + 3] = (triangle) vertexptr

Definition at line 1053 of file triangle.c.

◆ setareabound

#define setareabound (   otri,
  value 
)     ((REAL *) (otri).tri)[m->areaboundindex] = value

Definition at line 1110 of file triangle.c.

◆ setdest

#define setdest (   otri,
  vertexptr 
)     (otri).tri[minus1mod3[(otri).orient] + 3] = (triangle) vertexptr

Definition at line 1050 of file triangle.c.

◆ setelemattribute

#define setelemattribute (   otri,
  attnum,
  value 
)     ((REAL *) (otri).tri)[m->elemattribindex + (attnum)] = value

Definition at line 1103 of file triangle.c.

◆ setmark

#define setmark (   osub,
  value 
)     * (int *) ((osub).ss + 8) = value

Definition at line 1209 of file triangle.c.

◆ setorg

#define setorg (   otri,
  vertexptr 
)     (otri).tri[plus1mod3[(otri).orient] + 3] = (triangle) vertexptr

Definition at line 1047 of file triangle.c.

◆ setsdest

#define setsdest (   osub,
  vertexptr 
)     (osub).ss[3 - (osub).ssorient] = (subseg) vertexptr

Definition at line 1188 of file triangle.c.

◆ setsegdest

#define setsegdest (   osub,
  vertexptr 
)     (osub).ss[5 - (osub).ssorient] = (subseg) vertexptr

Definition at line 1200 of file triangle.c.

◆ setsegorg

#define setsegorg (   osub,
  vertexptr 
)     (osub).ss[4 + (osub).ssorient] = (subseg) vertexptr

Definition at line 1197 of file triangle.c.

◆ setsorg

#define setsorg (   osub,
  vertexptr 
)     (osub).ss[2 + (osub).ssorient] = (subseg) vertexptr

Definition at line 1185 of file triangle.c.

◆ setvertex2tri

#define setvertex2tri (   vx,
  value 
)     ((triangle *) (vx))[m->vertex2triindex] = value

Definition at line 1296 of file triangle.c.

◆ setvertexmark

#define setvertexmark (   vx,
  value 
)     ((int *) (vx))[m->vertexmarkindex] = value

Definition at line 1286 of file triangle.c.

◆ setvertextype

#define setvertextype (   vx,
  value 
)     ((int *) (vx))[m->vertexmarkindex + 1] = value

Definition at line 1291 of file triangle.c.

◆ snext

#define snext (   osub1,
  osub2 
)
Value:
sptr = (osub1).ss[1 - (osub1).ssorient]; \
sdecode(sptr, osub2)

Definition at line 1168 of file triangle.c.

◆ snextself

#define snextself (   osub)
Value:
sptr = (osub).ss[1 - (osub).ssorient]; \
sdecode(sptr, osub)

Definition at line 1172 of file triangle.c.

◆ sorg

#define sorg (   osub,
  vertexptr 
)     vertexptr = (vertex) (osub).ss[2 + (osub).ssorient]

Definition at line 1179 of file triangle.c.

◆ spivot

#define spivot (   osub1,
  osub2 
)
Value:
sptr = (osub1).ss[(osub1).ssorient]; \
sdecode(sptr, osub2)

Definition at line 1157 of file triangle.c.

◆ spivotself

#define spivotself (   osub)
Value:
sptr = (osub).ss[(osub).ssorient]; \
sdecode(sptr, osub)

Definition at line 1161 of file triangle.c.

◆ SPLAYNODEPERBLOCK

#define SPLAYNODEPERBLOCK   508

Definition at line 277 of file triangle.c.

◆ Split

#define Split (   a,
  ahi,
  alo 
)
Value:
c = (REAL) (splitter * a); \
abig = (REAL) (c - a); \
ahi = c - abig; \
alo = a - ahi
#define c(i)
Definition: RSha256.hxx:101
REAL splitter
Definition: triangle.c:617

Definition at line 4776 of file triangle.c.

◆ Square

#define Square (   a,
  x,
  y 
)
Value:
x = (REAL) (a * a); \
Square_Tail(a, x, y)

Definition at line 4813 of file triangle.c.

◆ Square_Tail

#define Square_Tail (   a,
  x,
  y 
)
Value:
Split(a, ahi, alo); \
err1 = x - (ahi * ahi); \
err3 = err1 - ((ahi + ahi) * alo); \
y = (alo * alo) - err3
#define Split(a, ahi, alo)
Definition: triangle.c:4776

Definition at line 4807 of file triangle.c.

◆ SQUAREROOTTWO

#define SQUAREROOTTWO   1.4142135623730950488016887242096980785696718753769480732

Definition at line 309 of file triangle.c.

◆ ssym

#define ssym (   osub1,
  osub2 
)
Value:
(osub2).ss = (osub1).ss; \
(osub2).ssorient = 1 - (osub1).ssorient

Definition at line 1147 of file triangle.c.

◆ ssymself

#define ssymself (   osub)     (osub).ssorient = 1 - (osub).ssorient

Definition at line 1151 of file triangle.c.

◆ STARTINDEX

#define STARTINDEX   0

◆ stdissolve

#define stdissolve (   osub)     (osub).ss[6 + (osub).ssorient] = (subseg) m->dummytri

Definition at line 1277 of file triangle.c.

◆ stpivot

#define stpivot (   osub,
  otri 
)
Value:
ptr = (triangle) (osub).ss[6 + (osub).ssorient]; \
decode(ptr, otri)

Definition at line 1260 of file triangle.c.

◆ subsegcopy

#define subsegcopy (   osub1,
  osub2 
)
Value:
(osub2).ss = (osub1).ss; \
(osub2).ssorient = (osub1).ssorient

Definition at line 1226 of file triangle.c.

◆ subsegequal

#define subsegequal (   osub1,
  osub2 
)
Value:
(((osub1).ss == (osub2).ss) && \
((osub1).ssorient == (osub2).ssorient))

Definition at line 1232 of file triangle.c.

◆ SUBSEGPERBLOCK

#define SUBSEGPERBLOCK   508 /* Number of subsegments allocated at once. */

Definition at line 267 of file triangle.c.

◆ sym

#define sym (   otri1,
  otri2 
)
Value:
ptr = (otri1).tri[(otri1).orient]; \
decode(ptr, otri2);

Definition at line 933 of file triangle.c.

◆ symself

#define symself (   otri)
Value:
ptr = (otri).tri[(otri).orient]; \
decode(ptr, otri);

Definition at line 937 of file triangle.c.

◆ TRILIBRARY

#define TRILIBRARY

Definition at line 214 of file triangle.c.

◆ TRIPERBLOCK

#define TRIPERBLOCK   4092 /* Number of triangles allocated at once. */

Definition at line 266 of file triangle.c.

◆ tsbond

#define tsbond (   otri,
  osub 
)
Value:
(otri).tri[6 + (otri).orient] = (triangle) sencode(osub); \
(osub).ss[6 + (osub).ssorient] = (subseg) encode(otri)

Definition at line 1266 of file triangle.c.

◆ tsdissolve

#define tsdissolve (   otri)     (otri).tri[6 + (otri).orient] = (triangle) m->dummysub

Definition at line 1272 of file triangle.c.

◆ tspivot

#define tspivot (   otri,
  osub 
)
Value:
sptr = (subseg) (otri).tri[6 + (otri).orient]; \
sdecode(sptr, osub)

Definition at line 1253 of file triangle.c.

◆ Two_Diff

#define Two_Diff (   a,
  b,
  x,
  y 
)
Value:
x = (REAL) (a - b); \
Two_Diff_Tail(a, b, x, y)

Definition at line 4772 of file triangle.c.

◆ Two_Diff_Tail

#define Two_Diff_Tail (   a,
  b,
  x,
  y 
)
Value:
bvirt = (REAL) (a - x); \
avirt = x + bvirt; \
bround = bvirt - b; \
around = a - avirt; \
y = around + bround

Definition at line 4765 of file triangle.c.

◆ Two_One_Diff

#define Two_One_Diff (   a1,
  a0,
  b,
  x2,
  x1,
  x0 
)
Value:
Two_Diff(a0, b , _i, x0); \
Two_Sum( a1, _i, x2, x1)
static const double x2[5]
static const double x1[5]
#define Two_Diff(a, b, x, y)
Definition: triangle.c:4772

Definition at line 4824 of file triangle.c.

◆ Two_One_Product

#define Two_One_Product (   a1,
  a0,
  b,
  x3,
  x2,
  x1,
  x0 
)
Value:
Split(b, bhi, blo); \
Two_Product_Presplit(a0, b, bhi, blo, _i, x0); \
Two_Product_Presplit(a1, b, bhi, blo, _j, _0); \
Two_Sum(_i, _0, _k, x1); \
Fast_Two_Sum(_j, _k, x3, x2)
static const double x3[11]

Definition at line 4838 of file triangle.c.

◆ Two_One_Sum

#define Two_One_Sum (   a1,
  a0,
  b,
  x2,
  x1,
  x0 
)
Value:
Two_Sum(a0, b , _i, x0); \
Two_Sum(a1, _i, x2, x1)
#define Two_Sum(a, b, x, y)
Definition: triangle.c:4761

Definition at line 4820 of file triangle.c.

◆ Two_Product

#define Two_Product (   a,
  b,
  x,
  y 
)
Value:
x = (REAL) (a * b); \
Two_Product_Tail(a, b, x, y)

Definition at line 4790 of file triangle.c.

◆ Two_Product_Presplit

#define Two_Product_Presplit (   a,
  b,
  bhi,
  blo,
  x,
  y 
)
Value:
x = (REAL) (a * b); \
Split(a, ahi, alo); \
err1 = x - (ahi * bhi); \
err2 = err1 - (alo * bhi); \
err3 = err2 - (ahi * blo); \
y = (alo * blo) - err3

Definition at line 4797 of file triangle.c.

◆ Two_Product_Tail

#define Two_Product_Tail (   a,
  b,
  x,
  y 
)
Value:
Split(a, ahi, alo); \
Split(b, bhi, blo); \
err1 = x - (ahi * bhi); \
err2 = err1 - (alo * bhi); \
err3 = err2 - (ahi * blo); \
y = (alo * blo) - err3

Definition at line 4782 of file triangle.c.

◆ Two_Sum

#define Two_Sum (   a,
  b,
  x,
  y 
)
Value:
x = (REAL) (a + b); \
Two_Sum_Tail(a, b, x, y)

Definition at line 4761 of file triangle.c.

◆ Two_Sum_Tail

#define Two_Sum_Tail (   a,
  b,
  x,
  y 
)
Value:
bvirt = (REAL) (x - a); \
avirt = x - bvirt; \
bround = b - bvirt; \
around = a - avirt; \
y = around + bround

Definition at line 4754 of file triangle.c.

◆ Two_Two_Diff

#define Two_Two_Diff (   a1,
  a0,
  b1,
  b0,
  x3,
  x2,
  x1,
  x0 
)
Value:
Two_One_Diff(a1, a0, b0, _j, _0, x0); \
Two_One_Diff(_j, _0, b1, x3, x2, x1)
#define Two_One_Diff(a1, a0, b, x2, x1, x0)
Definition: triangle.c:4824

Definition at line 4832 of file triangle.c.

◆ Two_Two_Sum

#define Two_Two_Sum (   a1,
  a0,
  b1,
  b0,
  x3,
  x2,
  x1,
  x0 
)
Value:
Two_One_Sum(a1, a0, b0, _j, _0, x0); \
Two_One_Sum(_j, _0, b1, x3, x2, x1)
#define Two_One_Sum(a1, a0, b, x2, x1, x0)
Definition: triangle.c:4820

Definition at line 4828 of file triangle.c.

◆ UNDEADVERTEX

#define UNDEADVERTEX   -32767

Definition at line 287 of file triangle.c.

◆ uninfect

#define uninfect (   otri)
Value:
(otri).tri[6] = (triangle) \
((uintptr_t) (otri).tri[6] & ~ (uintptr_t) 2l)

Definition at line 1089 of file triangle.c.

◆ vertex2tri

#define vertex2tri (   vx)    ((triangle *) (vx))[m->vertex2triindex]

Definition at line 1294 of file triangle.c.

◆ vertexmark

#define vertexmark (   vx)    ((int *) (vx))[m->vertexmarkindex]

Definition at line 1284 of file triangle.c.

◆ VERTEXPERBLOCK

#define VERTEXPERBLOCK   4092 /* Number of vertices allocated at once. */

Definition at line 268 of file triangle.c.

◆ vertextype

#define vertextype (   vx)    ((int *) (vx))[m->vertexmarkindex + 1]

Definition at line 1289 of file triangle.c.

◆ VIRUSPERBLOCK

#define VIRUSPERBLOCK   1020 /* Number of virus triangles allocated at once. */

Definition at line 269 of file triangle.c.

Typedef Documentation

◆ subseg

typedef REAL** subseg

Definition at line 496 of file triangle.c.

◆ triangle

typedef REAL** triangle

Definition at line 479 of file triangle.c.

◆ vertex

typedef REAL* vertex

Definition at line 513 of file triangle.c.

Enumeration Type Documentation

◆ finddirectionresult

Enumerator
WITHIN 
LEFTCOLLINEAR 
RIGHTCOLLINEAR 

Definition at line 360 of file triangle.c.

◆ insertvertexresult

Enumerator
SUCCESSFULVERTEX 
ENCROACHINGVERTEX 
VIOLATINGVERTEX 
DUPLICATEVERTEX 

Definition at line 352 of file triangle.c.

◆ locateresult

Enumerator
INTRIANGLE 
ONEDGE 
ONVERTEX 
OUTSIDE 

Definition at line 344 of file triangle.c.

Function Documentation

◆ alternateaxes()

void alternateaxes ( vertex sortarray,
int  arraysize,
int  axis 
)

Definition at line 9336 of file triangle.c.

◆ carveholes()

void carveholes ( struct mesh m,
struct behavior b,
REAL holelist,
int  holes,
REAL regionlist,
int  regions 
)

Definition at line 12964 of file triangle.c.

◆ constrainededge()

void constrainededge ( struct mesh m,
struct behavior b,
struct otri starttri,
vertex  endpoint2,
int  newmark 
)

Definition at line 12132 of file triangle.c.

◆ counterclockwise()

REAL counterclockwise ( struct mesh m,
struct behavior b,
vertex  pa,
vertex  pb,
vertex  pc 
)

Definition at line 5216 of file triangle.c.

◆ counterclockwiseadapt()

REAL counterclockwiseadapt ( vertex  pa,
vertex  pb,
vertex  pc,
REAL  detsum 
)

Definition at line 5127 of file triangle.c.

◆ delaunay()

long delaunay ( struct mesh m,
struct behavior b 
)

Definition at line 10998 of file triangle.c.

◆ delaunayfixup()

void delaunayfixup ( struct mesh m,
struct behavior b,
struct otri fixuptri,
int  leftside 
)

Definition at line 12012 of file triangle.c.

◆ divconqdelaunay()

long divconqdelaunay ( struct mesh m,
struct behavior b 
)

Definition at line 9954 of file triangle.c.

◆ divconqrecurse()

void divconqrecurse ( struct mesh m,
struct behavior b,
vertex sortarray,
int  vertices,
int  axis,
struct otri farleft,
struct otri farright 
)

Definition at line 9727 of file triangle.c.

◆ dummyinit()

void dummyinit ( struct mesh m,
struct behavior b,
int  trianglebytes,
int  subsegbytes 
)

Definition at line 4167 of file triangle.c.

◆ estimate()

REAL estimate ( int  elen,
REAL e 
)

Definition at line 5088 of file triangle.c.

◆ exactinit()

void exactinit ( )

Definition at line 4864 of file triangle.c.

◆ fast_expansion_sum_zeroelim()

int fast_expansion_sum_zeroelim ( int  elen,
REAL e,
int  flen,
REAL f,
REAL h 
)

Definition at line 4938 of file triangle.c.

◆ findcircumcenter()

void findcircumcenter ( struct mesh m,
struct behavior b,
vertex  torg,
vertex  tdest,
vertex  tapex,
vertex  circumcenter,
REAL xi,
REAL eta,
int  offcenter 
)

Definition at line 6495 of file triangle.c.

◆ finddirection()

enum finddirectionresult finddirection ( struct mesh m,
struct behavior b,
struct otri searchtri,
vertex  searchpoint 
)

Definition at line 10998 of file triangle.c.

◆ flip()

void flip ( struct mesh m,
struct behavior b,
struct otri flipedge 
)

Definition at line 7890 of file triangle.c.

◆ formskeleton()

void formskeleton ( struct mesh m,
struct behavior b,
int *  segmentlist,
int *  segmentmarkerlist,
int  numberofsegments 
)

Definition at line 12392 of file triangle.c.

◆ getvertex()

vertex getvertex ( struct mesh m,
struct behavior b,
int  number 
)

Definition at line 4556 of file triangle.c.

◆ highorder()

void highorder ( struct mesh m,
struct behavior b 
)

Definition at line 13695 of file triangle.c.

◆ incircle()

REAL incircle ( struct mesh m,
struct behavior b,
vertex  pa,
vertex  pb,
vertex  pc,
vertex  pd 
)

Definition at line 5864 of file triangle.c.

◆ incircleadapt()

REAL incircleadapt ( vertex  pa,
vertex  pb,
vertex  pc,
vertex  pd,
REAL  permanent 
)

Definition at line 5285 of file triangle.c.

◆ infecthull()

void infecthull ( struct mesh m,
struct behavior b 
)

Definition at line 12559 of file triangle.c.

◆ initializetrisubpools()

void initializetrisubpools ( struct mesh m,
struct behavior b 
)

Definition at line 4290 of file triangle.c.

◆ initializevertexpool()

void initializevertexpool ( struct mesh m,
struct behavior b 
)

Definition at line 4247 of file triangle.c.

◆ insertsegment()

void insertsegment ( struct mesh m,
struct behavior b,
vertex  endpoint1,
vertex  endpoint2,
int  newmark 
)

Definition at line 12234 of file triangle.c.

◆ insertsubseg()

void insertsubseg ( struct mesh m,
struct behavior b,
struct otri tri,
int  subsegmark 
)

Definition at line 7786 of file triangle.c.

◆ insertvertex()

enum insertvertexresult insertvertex ( struct mesh m,
struct behavior b,
vertex  newvertex,
struct otri searchtri,
struct osub splitseg,
int  segmentflaws,
int  triflaws 
)

Definition at line 8025 of file triangle.c.

◆ internalerror()

void internalerror ( )

Definition at line 3242 of file triangle.c.

◆ locate()

enum locateresult locate ( struct mesh m,
struct behavior b,
vertex  searchpoint,
struct otri searchtri 
)

Definition at line 7376 of file triangle.c.

◆ makesubseg()

void makesubseg ( struct mesh m,
struct osub newsubseg 
)

Definition at line 4682 of file triangle.c.

◆ maketriangle()

void maketriangle ( struct mesh m,
struct behavior b,
struct otri newotri 
)

Definition at line 4638 of file triangle.c.

◆ makevertexmap()

void makevertexmap ( struct mesh m,
struct behavior b 
)

Definition at line 7376 of file triangle.c.

◆ markhull()

void markhull ( struct mesh m,
struct behavior b 
)

Definition at line 12346 of file triangle.c.

◆ mergehulls()

void mergehulls ( struct mesh m,
struct behavior b,
struct otri farleft,
struct otri innerleft,
struct otri innerright,
struct otri farright,
int  axis 
)

Definition at line 9400 of file triangle.c.

◆ nonregular()

REAL nonregular ( struct mesh m,
struct behavior b,
vertex  pa,
vertex  pb,
vertex  pc,
vertex  pd 
)

Definition at line 6454 of file triangle.c.

◆ numbernodes()

void numbernodes ( struct mesh m,
struct behavior b 
)

Definition at line 14446 of file triangle.c.

◆ orient3d()

REAL orient3d ( struct mesh m,
struct behavior b,
vertex  pa,
vertex  pb,
vertex  pc,
vertex  pd,
REAL  aheight,
REAL  bheight,
REAL  cheight,
REAL  dheight 
)

Definition at line 6371 of file triangle.c.

◆ orient3dadapt()

REAL orient3dadapt ( vertex  pa,
vertex  pb,
vertex  pc,
vertex  pd,
REAL  aheight,
REAL  bheight,
REAL  cheight,
REAL  dheight,
REAL  permanent 
)

Definition at line 5946 of file triangle.c.

◆ parsecommandline()

void parsecommandline ( int  argc,
char **  argv,
struct behavior b 
)

Definition at line 3258 of file triangle.c.

◆ plague()

void plague ( struct mesh m,
struct behavior b 
)

Definition at line 12641 of file triangle.c.

◆ poolalloc()

VOID* poolalloc ( struct memorypool pool)

Definition at line 3980 of file triangle.c.

◆ pooldealloc()

void pooldealloc ( struct memorypool pool,
VOID dyingitem 
)

Definition at line 4043 of file triangle.c.

◆ pooldeinit()

void pooldeinit ( struct memorypool pool)

Definition at line 3959 of file triangle.c.

◆ poolinit()

void poolinit ( struct memorypool pool,
int  bytecount,
int  itemcount,
int  firstitemcount,
int  alignment 
)

Definition at line 3911 of file triangle.c.

◆ poolrestart()

void poolrestart ( struct memorypool pool)

Definition at line 3865 of file triangle.c.

◆ poolzero()

void poolzero ( struct memorypool pool)

Definition at line 3831 of file triangle.c.

◆ preciselocate()

enum locateresult preciselocate ( struct mesh m,
struct behavior b,
vertex  searchpoint,
struct otri searchtri,
int  stopatsubsegment 
)

Definition at line 7376 of file triangle.c.

◆ printsubseg()

void printsubseg ( struct mesh m,
struct behavior b,
struct osub s 
)

Definition at line 3735 of file triangle.c.

◆ printtriangle()

void printtriangle ( struct mesh m,
struct behavior b,
struct otri t 
)

Definition at line 3641 of file triangle.c.

◆ quality_statistics()

void quality_statistics ( struct mesh m,
struct behavior b 
)

Definition at line 15325 of file triangle.c.

◆ randomnation()

uintptr_t randomnation ( unsigned int  choices)

Definition at line 6648 of file triangle.c.

◆ regionplague()

void regionplague ( struct mesh m,
struct behavior b,
REAL  attribute,
REAL  area 
)

Definition at line 12851 of file triangle.c.

◆ removeghosts()

long removeghosts ( struct mesh m,
struct behavior b,
struct otri startghost 
)

Definition at line 9891 of file triangle.c.

◆ scale_expansion_zeroelim()

int scale_expansion_zeroelim ( int  elen,
REAL e,
REAL  b,
REAL h 
)

Definition at line 5032 of file triangle.c.

◆ scoutsegment()

int scoutsegment ( struct mesh m,
struct behavior b,
struct otri searchtri,
vertex  endpoint2,
int  newmark 
)

Definition at line 11798 of file triangle.c.

◆ segmentintersection()

void segmentintersection ( struct mesh m,
struct behavior b,
struct otri splittri,
struct osub splitsubseg,
vertex  endpoint2 
)

Definition at line 11670 of file triangle.c.

◆ statistics()

void statistics ( struct mesh m,
struct behavior b 
)

Definition at line 15533 of file triangle.c.

◆ subsegdealloc()

void subsegdealloc ( struct mesh m,
subseg dyingsubseg 
)

Definition at line 4403 of file triangle.c.

◆ subsegtraverse()

subseg* subsegtraverse ( struct mesh m)

Definition at line 4424 of file triangle.c.

◆ transfernodes()

void transfernodes ( struct mesh m,
struct behavior b,
REAL pointlist,
REAL pointattriblist,
int *  pointmarkerlist,
int  numberofpoints,
int  numberofpointattribs 
)

Definition at line 14068 of file triangle.c.

◆ traversalinit()

void traversalinit ( struct memorypool pool)

Definition at line 4066 of file triangle.c.

◆ traverse()

VOID* traverse ( struct memorypool pool)

Definition at line 4102 of file triangle.c.

◆ triangledealloc()

void triangledealloc ( struct mesh m,
triangle dyingtriangle 
)

Definition at line 4357 of file triangle.c.

◆ triangledeinit()

void triangledeinit ( struct mesh m,
struct behavior b 
)

Definition at line 4597 of file triangle.c.

◆ triangleinit()

void triangleinit ( struct mesh m)

Definition at line 6609 of file triangle.c.

◆ triangletraverse()

triangle* triangletraverse ( struct mesh m)

Definition at line 4378 of file triangle.c.

◆ triangulate()

void triangulate ( char *  triswitches,
struct triangulateio in,
struct triangulateio out,
struct triangulateio vorout 
)

Definition at line 15653 of file triangle.c.

◆ triangulatepolygon()

void triangulatepolygon ( struct mesh m,
struct behavior b,
struct otri firstedge,
struct otri lastedge,
int  edgecount,
int  doflip,
int  triflaws 
)

Definition at line 8835 of file triangle.c.

◆ triexit()

void triexit ( int  status)

Definition at line 1386 of file triangle.c.

◆ trifree()

void trifree ( VOID memptr)

Definition at line 1415 of file triangle.c.

◆ trimalloc()

VOID* trimalloc ( int  size)

Definition at line 1397 of file triangle.c.

◆ triunsuitable()

int triunsuitable ( vertex  triorg,
vertex  tridest,
vertex  triapex,
REAL  area 
)

Definition at line 1337 of file triangle.c.

◆ unflip()

void unflip ( struct mesh m,
struct behavior b,
struct otri flipedge 
)

Definition at line 8025 of file triangle.c.

◆ vertexdealloc()

void vertexdealloc ( struct mesh m,
vertex  dyingvertex 
)

Definition at line 4449 of file triangle.c.

◆ vertexmedian()

void vertexmedian ( vertex sortarray,
int  arraysize,
int  median,
int  axis 
)

Definition at line 9258 of file triangle.c.

◆ vertexsort()

void vertexsort ( vertex sortarray,
int  arraysize 
)

Definition at line 9184 of file triangle.c.

◆ vertextraverse()

vertex vertextraverse ( struct mesh m)

Definition at line 4470 of file triangle.c.

◆ writeedges()

void writeedges ( struct mesh m,
struct behavior b,
int **  edgelist,
int **  edgemarkerlist 
)

Definition at line 14765 of file triangle.c.

◆ writeelements()

void writeelements ( struct mesh m,
struct behavior b,
int **  trianglelist,
REAL **  triangleattriblist 
)

Definition at line 14478 of file triangle.c.

◆ writeneighbors()

void writeneighbors ( struct mesh m,
struct behavior b,
int **  neighborlist 
)

Definition at line 15132 of file triangle.c.

◆ writenodes()

void writenodes ( struct mesh m,
struct behavior b,
REAL **  pointlist,
REAL **  pointattriblist,
int **  pointmarkerlist 
)

Definition at line 14306 of file triangle.c.

◆ writepoly()

void writepoly ( struct mesh m,
struct behavior b,
int **  segmentlist,
int **  segmentmarkerlist 
)

Definition at line 14619 of file triangle.c.

◆ writevoronoi()

void writevoronoi ( struct mesh m,
struct behavior b,
REAL **  vpointlist,
REAL **  vpointattriblist,
int **  vpointmarkerlist,
int **  vedgelist,
int **  vedgemarkerlist,
REAL **  vnormlist 
)

Definition at line 14919 of file triangle.c.

Variable Documentation

◆ ccwerrboundA

REAL ccwerrboundA

Definition at line 620 of file triangle.c.

◆ ccwerrboundB

REAL ccwerrboundB

Definition at line 620 of file triangle.c.

◆ ccwerrboundC

REAL ccwerrboundC

Definition at line 620 of file triangle.c.

◆ epsilon

REAL epsilon

Definition at line 618 of file triangle.c.

◆ iccerrboundA

REAL iccerrboundA

Definition at line 621 of file triangle.c.

◆ iccerrboundB

REAL iccerrboundB

Definition at line 621 of file triangle.c.

◆ iccerrboundC

REAL iccerrboundC

Definition at line 621 of file triangle.c.

◆ minus1mod3

int minus1mod3[3] = {2, 0, 1}

Definition at line 904 of file triangle.c.

◆ o3derrboundA

REAL o3derrboundA

Definition at line 622 of file triangle.c.

◆ o3derrboundB

REAL o3derrboundB

Definition at line 622 of file triangle.c.

◆ o3derrboundC

REAL o3derrboundC

Definition at line 622 of file triangle.c.

◆ plus1mod3

int plus1mod3[3] = {1, 2, 0}

Definition at line 903 of file triangle.c.

◆ randomseed

uintptr_t randomseed

Definition at line 626 of file triangle.c.

◆ resulterrbound

REAL resulterrbound

Definition at line 619 of file triangle.c.

◆ splitter

REAL splitter

Definition at line 617 of file triangle.c.