ROOT  6.07/01
Reference Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Macros | Typedefs | Enumerations | Functions | Variables
triangle.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include "triangle.h"
Include dependency graph for triangle.c:

Go to the source code of this file.

Macros

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

Typedefs

typedef REAL ** triangle
 
typedef REAL ** subseg
 
typedef REALvertex
 

Enumerations

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

Functions

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

Variables

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

Macro Definition Documentation

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

Definition at line 4729 of file triangle.c.

Referenced by counterclockwiseadapt(), incircle(), incircleadapt(), orient3d(), and orient3dadapt().

#define apex (   otri,
  vertexptr 
)    vertexptr = (vertex) (otri).tri[(otri).orient + 3]
#define areabound (   otri)    ((REAL *) (otri).tri)[m->areaboundindex]

Definition at line 1107 of file triangle.c.

Referenced by insertvertex(), and printtriangle().

#define BADSUBSEGPERBLOCK   252

Definition at line 271 of file triangle.c.

#define BADTRIPERBLOCK   4092

Definition at line 273 of file triangle.c.

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

Definition at line 1057 of file triangle.c.

Referenced by divconqrecurse(), flip(), insertvertex(), mergehulls(), and unflip().

#define CDT_ONLY

Definition at line 227 of file triangle.c.

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

Definition at line 1240 of file triangle.c.

Referenced by subsegtraverse().

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

Definition at line 1117 of file triangle.c.

Referenced by carveholes(), locate(), and triangletraverse().

#define DEADVERTEX   -32768

Definition at line 286 of file triangle.c.

Referenced by vertexdealloc(), and vertextraverse().

#define decode (   ptr,
  otri 
)
Value:
(otri).orient = (int) ((unsigned long) (ptr) & (unsigned long) 3l); \
(otri).tri = (triangle *) \
((unsigned long) (ptr) ^ (unsigned long) (otri).orient)
TLine * l
Definition: textangle.C:4
REAL ** triangle
Definition: triangle.c:478

Definition at line 912 of file triangle.c.

Referenced by TQRootCanvas::dropEvent(), insertsegment(), printsubseg(), printtriangle(), TRSA_fun::TRSA_fun(), and uic_load_pixmap().

#define dest (   otri,
  vertexptr 
)    vertexptr = (vertex) (otri).tri[minus1mod3[(otri).orient] + 3]
#define dissolve (   otri)    (otri).tri[(otri).orient] = (triangle) m->dummytri

Definition at line 1066 of file triangle.c.

Referenced by plague(), and removeghosts().

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

Definition at line 986 of file triangle.c.

Referenced by TGeoChecker::ShapeDistances().

#define dnextself (   otri)
Value:
symself(otri); \
lprevself(otri);
#define lprevself(otri)
Definition: triangle.c:955
#define symself(otri)
Definition: triangle.c:936

Definition at line 990 of file triangle.c.

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

Definition at line 998 of file triangle.c.

#define dprevself (   otri)
Value:
lnextself(otri); \
symself(otri);
#define lnextself(otri)
Definition: triangle.c:946
#define symself(otri)
Definition: triangle.c:936

Definition at line 1002 of file triangle.c.

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

Definition at line 1099 of file triangle.c.

Referenced by insertvertex(), and writeelements().

#define encode (   otri)    (triangle) ((unsigned long) (otri).tri | (unsigned long) (otri).orient)
#define Fast_Two_Sum (   a,
  b,
  x,
  y 
)
Value:
x = (REAL) (a + b); \
TArc * a
Definition: textangle.C:12
#define REAL
Definition: triangle.h:277
Double_t x[n]
Definition: legend1.C:17
#define Fast_Two_Sum_Tail(a, b, x, y)
Definition: triangle.c:4745
Double_t y[n]
Definition: legend1.C:17

Definition at line 4749 of file triangle.c.

Referenced by fast_expansion_sum_zeroelim(), and scale_expansion_zeroelim().

#define Fast_Two_Sum_Tail (   a,
  b,
  x,
  y 
)
Value:
bvirt = x - a; \
y = b - bvirt
TArc * a
Definition: textangle.C:12
Double_t x[n]
Definition: legend1.C:17
Double_t y[n]
Definition: legend1.C:17

Definition at line 4745 of file triangle.c.

#define FILENAMESIZE   2048

Definition at line 255 of file triangle.c.

Referenced by parsecommandline().

#define FLIPSTACKERPERBLOCK   252

Definition at line 275 of file triangle.c.

#define FREEVERTEX   2

Definition at line 285 of file triangle.c.

Referenced by highorder().

#define INEXACT   /* Nothing */
#define infect (   otri)
Value:
(otri).tri[6] = (triangle) \
((unsigned long) (otri).tri[6] | (unsigned long) 2l)
TLine * l
Definition: textangle.C:4
REAL ** triangle
Definition: triangle.c:478

Definition at line 1084 of file triangle.c.

Referenced by carveholes(), infecthull(), plague(), and regionplague().

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

Definition at line 1094 of file triangle.c.

Referenced by carveholes(), infecthull(), plague(), and regionplague().

#define INPUTLINESIZE   1024

Definition at line 260 of file triangle.c.

Referenced by formskeleton().

#define INPUTVERTEX   0

Definition at line 283 of file triangle.c.

Referenced by segmentintersection(), and transfernodes().

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

Definition at line 1242 of file triangle.c.

Referenced by subsegdealloc().

#define killtri (   tria)
Value:
(tria)[1] = (triangle) NULL; \
(tria)[3] = (triangle) NULL
#define NULL
Definition: Rtypes.h:82
REAL ** triangle
Definition: triangle.c:478

Definition at line 1119 of file triangle.c.

Referenced by triangledealloc().

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

Definition at line 942 of file triangle.c.

Referenced by TGeoChecker::CheckBoundaryReference(), constrainededge(), delaunayfixup(), divconqrecurse(), flip(), insertvertex(), mergehulls(), preciselocate(), removeghosts(), scoutsegment(), and unflip().

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

Definition at line 951 of file triangle.c.

Referenced by divconqrecurse(), flip(), insertvertex(), mergehulls(), preciselocate(), removeghosts(), and unflip().

#define lprevself (   otri)    (otri).orient = minus1mod3[(otri).orient]
#define mark (   osub)    (* (int *) ((osub).ss + 8))
#define NO_TIMER

Definition at line 200 of file triangle.c.

#define ONETHIRD   0.333333333333333333333333333333333333333333333333333333333333

Definition at line 313 of file triangle.c.

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

Definition at line 962 of file triangle.c.

Referenced by finddirection(), plague(), and triangulatepolygon().

#define onextself (   otri)
Value:
lprevself(otri); \
symself(otri);
#define lprevself(otri)
Definition: triangle.c:955
#define symself(otri)
Definition: triangle.c:936

Definition at line 966 of file triangle.c.

Referenced by finddirection(), plague(), segmentintersection(), and triangulatepolygon().

#define oprev (   otri1,
  otri2 
)
Value:
sym(otri1, otri2); \
lnextself(otri2);
#define lnextself(otri)
Definition: triangle.c:946
#define sym(otri1, otri2)
Definition: triangle.c:932

Definition at line 974 of file triangle.c.

Referenced by constrainededge(), infecthull(), markhull(), plague(), and triangulatepolygon().

#define oprevself (   otri)
Value:
symself(otri); \
lnextself(otri);
#define lnextself(otri)
Definition: triangle.c:946
#define symself(otri)
Definition: triangle.c:936

Definition at line 978 of file triangle.c.

Referenced by constrainededge(), finddirection(), and plague().

#define org (   otri,
  vertexptr 
)    vertexptr = (vertex) (otri).tri[plus1mod3[(otri).orient] + 3]
#define otricopy (   otri1,
  otri2 
)
Value:
(otri2).tri = (otri1).tri; \
(otri2).orient = (otri1).orient

Definition at line 1071 of file triangle.c.

Referenced by carveholes(), divconqrecurse(), infecthull(), insertsegment(), insertvertex(), locate(), markhull(), mergehulls(), preciselocate(), removeghosts(), scoutsegment(), and triangulatepolygon().

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

Definition at line 1077 of file triangle.c.

Referenced by infecthull(), markhull(), plague(), and removeghosts().

#define PI   3.141592653589793238462643383279502884197169399375105820974944592308

Definition at line 305 of file triangle.c.

Referenced by parsecommandline(), and quality_statistics().

#define REDUCED

Definition at line 226 of file triangle.c.

#define rnext (   otri1,
  otri2 
)
Value:
sym(otri1, otri2); \
lnextself(otri2); \
symself(otri2);
#define lnextself(otri)
Definition: triangle.c:946
#define symself(otri)
Definition: triangle.c:936
#define sym(otri1, otri2)
Definition: triangle.c:932

Definition at line 1010 of file triangle.c.

#define rnextself (   otri)
Value:
symself(otri); \
lnextself(otri); \
symself(otri);
#define lnextself(otri)
Definition: triangle.c:946
#define symself(otri)
Definition: triangle.c:936

Definition at line 1015 of file triangle.c.

#define rprev (   otri1,
  otri2 
)
Value:
sym(otri1, otri2); \
lprevself(otri2); \
symself(otri2);
#define lprevself(otri)
Definition: triangle.c:955
#define symself(otri)
Definition: triangle.c:936
#define sym(otri1, otri2)
Definition: triangle.c:932

Definition at line 1024 of file triangle.c.

Referenced by TMVA::RuleFitParams::MakeGDPath().

#define rprevself (   otri)
Value:
symself(otri); \
lprevself(otri); \
symself(otri);
#define lprevself(otri)
Definition: triangle.c:955
#define symself(otri)
Definition: triangle.c:936

Definition at line 1029 of file triangle.c.

#define SAMPLEFACTOR   11

Definition at line 295 of file triangle.c.

Referenced by locate().

#define SAMPLERATE   10

Definition at line 301 of file triangle.c.

#define sbond (   osub1,
  osub2 
)
Value:
(osub1).ss[(osub1).ssorient] = sencode(osub2); \
(osub2).ss[(osub2).ssorient] = sencode(osub1)
TServerSocket * ss
Definition: hserv2.C:30
#define sencode(osub)
Definition: triangle.c:1141

Definition at line 1213 of file triangle.c.

Referenced by insertvertex().

#define sdecode (   sptr,
  osub 
)
Value:
(osub).ssorient = (int) ((unsigned long) (sptr) & (unsigned long) 1l); \
(osub).ss = (subseg *) \
((unsigned long) (sptr) & ~ (unsigned long) 3l)
TServerSocket * ss
Definition: hserv2.C:30
REAL ** subseg
Definition: triangle.c:495
TLine * l
Definition: textangle.C:4

Definition at line 1132 of file triangle.c.

Referenced by printsubseg(), and printtriangle().

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

Definition at line 1181 of file triangle.c.

Referenced by insertvertex(), printsubseg(), and writepoly().

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

Definition at line 1220 of file triangle.c.

Referenced by segmentintersection().

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

Definition at line 1193 of file triangle.c.

Referenced by insertvertex(), and printsubseg().

#define SEGMENTVERTEX   1

Definition at line 284 of file triangle.c.

Referenced by highorder().

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

Definition at line 1190 of file triangle.c.

Referenced by insertvertex(), and printsubseg().

#define sencode (   osub)    (subseg) ((unsigned long) (osub).ss | (unsigned long) (osub).ssorient)

Definition at line 1141 of file triangle.c.

Referenced by insertvertex().

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

Definition at line 1052 of file triangle.c.

Referenced by divconqrecurse(), flip(), insertvertex(), mergehulls(), and unflip().

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

Definition at line 1109 of file triangle.c.

Referenced by insertvertex(), maketriangle(), and regionplague().

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

Definition at line 1049 of file triangle.c.

Referenced by divconqrecurse(), flip(), insertvertex(), mergehulls(), and unflip().

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

Definition at line 1102 of file triangle.c.

Referenced by carveholes(), insertvertex(), maketriangle(), and regionplague().

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

Definition at line 1208 of file triangle.c.

Referenced by infecthull(), insertsubseg(), makesubseg(), and plague().

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

Definition at line 1046 of file triangle.c.

Referenced by divconqrecurse(), flip(), insertvertex(), mergehulls(), plague(), and unflip().

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

Definition at line 1187 of file triangle.c.

Referenced by insertsubseg(), and insertvertex().

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

Definition at line 1199 of file triangle.c.

Referenced by insertsubseg(), and insertvertex().

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

Definition at line 1196 of file triangle.c.

Referenced by insertsubseg(), insertvertex(), and segmentintersection().

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

Definition at line 1184 of file triangle.c.

Referenced by insertsubseg().

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

Definition at line 1295 of file triangle.c.

Referenced by makevertexmap(), and segmentintersection().

#define setvertexmark (   vx,
  value 
)    ((int *) (vx))[m->vertexmarkindex] = value
#define setvertextype (   vx,
  value 
)    ((int *) (vx))[m->vertexmarkindex + 1] = value
#define snext (   osub1,
  osub2 
)
#define snextself (   osub)
Value:
sptr = (osub).ss[1 - (osub).ssorient]; \
sdecode(sptr, osub)
TServerSocket * ss
Definition: hserv2.C:30
#define sdecode(sptr, osub)
Definition: triangle.c:1132

Definition at line 1171 of file triangle.c.

Referenced by segmentintersection().

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

Definition at line 1178 of file triangle.c.

Referenced by insertvertex(), printsubseg(), and writepoly().

#define spivot (   osub1,
  osub2 
)
Value:
sptr = (osub1).ss[(osub1).ssorient]; \
sdecode(sptr, osub2)
TServerSocket * ss
Definition: hserv2.C:30
#define sdecode(sptr, osub)
Definition: triangle.c:1132

Definition at line 1156 of file triangle.c.

Referenced by insertvertex(), and segmentintersection().

#define spivotself (   osub)
Value:
sptr = (osub).ss[(osub).ssorient]; \
sdecode(sptr, osub)
TServerSocket * ss
Definition: hserv2.C:30
#define sdecode(sptr, osub)
Definition: triangle.c:1132

Definition at line 1160 of file triangle.c.

#define SPLAYNODEPERBLOCK   508

Definition at line 277 of file triangle.c.

#define Split (   a,
  ahi,
  alo 
)
Value:
c = (REAL) (splitter * a); \
abig = (REAL) (c - a); \
ahi = c - abig; \
alo = a - ahi
return c
REAL splitter
Definition: triangle.c:616
TArc * a
Definition: textangle.C:12
#define REAL
Definition: triangle.h:277

Definition at line 4775 of file triangle.c.

Referenced by ROOT::Math::KDTree< _DataPoint >::TerminalNode::Insert(), ROOT::Minuit2::MPIProcess::MPIProcess(), and scale_expansion_zeroelim().

#define Square (   a,
  x,
  y 
)
Value:
x = (REAL) (a * a); \
#define Square_Tail(a, x, y)
Definition: triangle.c:4806
TArc * a
Definition: textangle.C:12
#define REAL
Definition: triangle.h:277
Double_t x[n]
Definition: legend1.C:17
Double_t y[n]
Definition: legend1.C:17

Definition at line 4812 of file triangle.c.

Referenced by incircleadapt().

#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:4775
TArc * a
Definition: textangle.C:12
Double_t x[n]
Definition: legend1.C:17
Double_t y[n]
Definition: legend1.C:17

Definition at line 4806 of file triangle.c.

#define SQUAREROOTTWO   1.4142135623730950488016887242096980785696718753769480732

Definition at line 309 of file triangle.c.

#define ssym (   osub1,
  osub2 
)
Value:
(osub2).ss = (osub1).ss; \
(osub2).ssorient = 1 - (osub1).ssorient
TServerSocket * ss
Definition: hserv2.C:30

Definition at line 1146 of file triangle.c.

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

Definition at line 1150 of file triangle.c.

Referenced by insertsubseg(), insertvertex(), and segmentintersection().

#define STARTINDEX   0

Referenced by parsecommandline().

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

Definition at line 1276 of file triangle.c.

Referenced by plague().

#define stpivot (   osub,
  otri 
)
Value:
ptr = (triangle) (osub).ss[6 + (osub).ssorient]; \
decode(ptr, otri)
#define decode(ptr, otri)
Definition: triangle.c:912
REAL ** triangle
Definition: triangle.c:478

Definition at line 1259 of file triangle.c.

#define subsegcopy (   osub1,
  osub2 
)
Value:
(osub2).ss = (osub1).ss; \
(osub2).ssorient = (osub1).ssorient
TServerSocket * ss
Definition: hserv2.C:30

Definition at line 1225 of file triangle.c.

#define subsegequal (   osub1,
  osub2 
)
Value:
(((osub1).ss == (osub2).ss) && \
((osub1).ssorient == (osub2).ssorient))
TServerSocket * ss
Definition: hserv2.C:30

Definition at line 1231 of file triangle.c.

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

Definition at line 267 of file triangle.c.

Referenced by initializetrisubpools().

#define sym (   otri1,
  otri2 
)
#define symself (   otri)
Value:
ptr = (otri).tri[(otri).orient]; \
decode(ptr, otri);
#define decode(ptr, otri)
Definition: triangle.c:912

Definition at line 936 of file triangle.c.

Referenced by carveholes(), infecthull(), insertsegment(), insertvertex(), locate(), markhull(), mergehulls(), and removeghosts().

#define TRILIBRARY

Definition at line 214 of file triangle.c.

Referenced by writeelements().

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

Definition at line 266 of file triangle.c.

Referenced by initializetrisubpools(), and locate().

#define tsbond (   otri,
  osub 
)
Value:
(otri).tri[6 + (otri).orient] = (triangle) sencode(osub); \
(osub).ss[6 + (osub).ssorient] = (subseg) encode(otri)
TServerSocket * ss
Definition: hserv2.C:30
REAL ** subseg
Definition: triangle.c:495
#define sencode(osub)
Definition: triangle.c:1141
#define encode(otri)
Definition: triangle.c:921
REAL ** triangle
Definition: triangle.c:478

Definition at line 1265 of file triangle.c.

Referenced by flip(), insertsubseg(), insertvertex(), and unflip().

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

Definition at line 1271 of file triangle.c.

Referenced by flip(), insertvertex(), plague(), and unflip().

#define tspivot (   otri,
  osub 
)
Value:
sptr = (subseg) (otri).tri[6 + (otri).orient]; \
sdecode(sptr, osub)
REAL ** subseg
Definition: triangle.c:495
#define sdecode(sptr, osub)
Definition: triangle.c:1132

Definition at line 1252 of file triangle.c.

Referenced by constrainededge(), delaunayfixup(), flip(), highorder(), infecthull(), insertsubseg(), insertvertex(), plague(), preciselocate(), regionplague(), scoutsegment(), unflip(), and writeedges().

#define Two_Diff (   a,
  b,
  x,
  y 
)
Value:
x = (REAL) (a - b); \
TArc * a
Definition: textangle.C:12
#define REAL
Definition: triangle.h:277
Double_t x[n]
Definition: legend1.C:17
Double_t y[n]
Definition: legend1.C:17
#define Two_Diff_Tail(a, b, x, y)
Definition: triangle.c:4764

Definition at line 4771 of file triangle.c.

#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
TArc * a
Definition: textangle.C:12
#define REAL
Definition: triangle.h:277
Double_t x[n]
Definition: legend1.C:17
Double_t y[n]
Definition: legend1.C:17

Definition at line 4764 of file triangle.c.

Referenced by counterclockwiseadapt(), incircleadapt(), and orient3dadapt().

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

Definition at line 4823 of file triangle.c.

#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)
#define Split(a, ahi, alo)
Definition: triangle.c:4775
#define Two_Sum(a, b, x, y)
Definition: triangle.c:4760
static const double x2[5]
#define Two_Product_Presplit(a, b, bhi, blo, x, y)
Definition: triangle.c:4796
static const double x1[5]
#define Fast_Two_Sum(a, b, x, y)
Definition: triangle.c:4749
static const double x3[11]

Definition at line 4837 of file triangle.c.

Referenced by orient3dadapt().

#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:4760
static const double x2[5]
static const double x1[5]

Definition at line 4819 of file triangle.c.

#define Two_Product (   a,
  b,
  x,
  y 
)
Value:
x = (REAL) (a * b); \
TArc * a
Definition: textangle.C:12
#define Two_Product_Tail(a, b, x, y)
Definition: triangle.c:4781
#define REAL
Definition: triangle.h:277
Double_t x[n]
Definition: legend1.C:17
Double_t y[n]
Definition: legend1.C:17

Definition at line 4789 of file triangle.c.

Referenced by counterclockwiseadapt(), incircleadapt(), and orient3dadapt().

#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
#define Split(a, ahi, alo)
Definition: triangle.c:4775
TArc * a
Definition: textangle.C:12
#define REAL
Definition: triangle.h:277
Double_t x[n]
Definition: legend1.C:17
Double_t y[n]
Definition: legend1.C:17

Definition at line 4796 of file triangle.c.

Referenced by scale_expansion_zeroelim().

#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
#define Split(a, ahi, alo)
Definition: triangle.c:4775
TArc * a
Definition: textangle.C:12
Double_t x[n]
Definition: legend1.C:17
Double_t y[n]
Definition: legend1.C:17

Definition at line 4781 of file triangle.c.

#define Two_Sum (   a,
  b,
  x,
  y 
)
Value:
x = (REAL) (a + b); \
TArc * a
Definition: textangle.C:12
#define REAL
Definition: triangle.h:277
Double_t x[n]
Definition: legend1.C:17
#define Two_Sum_Tail(a, b, x, y)
Definition: triangle.c:4753
Double_t y[n]
Definition: legend1.C:17

Definition at line 4760 of file triangle.c.

Referenced by fast_expansion_sum_zeroelim(), and scale_expansion_zeroelim().

#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
TArc * a
Definition: textangle.C:12
#define REAL
Definition: triangle.h:277
Double_t x[n]
Definition: legend1.C:17
Double_t y[n]
Definition: legend1.C:17

Definition at line 4753 of file triangle.c.

#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)
static const double x2[5]
#define Two_One_Diff(a1, a0, b, x2, x1, x0)
Definition: triangle.c:4823
static const double x1[5]
static const double x3[11]

Definition at line 4831 of file triangle.c.

Referenced by counterclockwiseadapt(), incircleadapt(), and orient3dadapt().

#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)
static const double x2[5]
#define Two_One_Sum(a1, a0, b, x2, x1, x0)
Definition: triangle.c:4819
static const double x1[5]
static const double x3[11]

Definition at line 4827 of file triangle.c.

Referenced by incircleadapt().

#define UNDEADVERTEX   -32767

Definition at line 287 of file triangle.c.

Referenced by divconqdelaunay(), numbernodes(), plague(), and writenodes().

#define uninfect (   otri)
Value:
(otri).tri[6] = (triangle) \
((unsigned long) (otri).tri[6] & ~ (unsigned long) 2l)
TLine * l
Definition: textangle.C:4
REAL ** triangle
Definition: triangle.c:478

Definition at line 1088 of file triangle.c.

Referenced by plague(), and regionplague().

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

Definition at line 1293 of file triangle.c.

Referenced by insertsegment().

#define vertexmark (   vx)    ((int *) (vx))[m->vertexmarkindex]
#define VERTEXPERBLOCK   4092 /* Number of vertices allocated at once. */

Definition at line 268 of file triangle.c.

Referenced by initializevertexpool().

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

Definition at line 1288 of file triangle.c.

Referenced by numbernodes(), vertextraverse(), and writenodes().

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

Definition at line 269 of file triangle.c.

Referenced by carveholes().

Typedef Documentation

typedef REAL** subseg

Definition at line 495 of file triangle.c.

typedef REAL** triangle

Definition at line 478 of file triangle.c.

typedef REAL* vertex

Definition at line 512 of file triangle.c.

Enumeration Type Documentation

Enumerator
WITHIN 
LEFTCOLLINEAR 
RIGHTCOLLINEAR 

Definition at line 359 of file triangle.c.

Enumerator
SUCCESSFULVERTEX 
ENCROACHINGVERTEX 
VIOLATINGVERTEX 
DUPLICATEVERTEX 

Definition at line 351 of file triangle.c.

Enumerator
INTRIANGLE 
ONEDGE 
ONVERTEX 
OUTSIDE 

Definition at line 343 of file triangle.c.

Function Documentation

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

Definition at line 9335 of file triangle.c.

Referenced by divconqdelaunay().

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

Definition at line 12963 of file triangle.c.

Referenced by triangulate().

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

Definition at line 12131 of file triangle.c.

Referenced by insertsegment().

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

Definition at line 5126 of file triangle.c.

Referenced by counterclockwise().

long delaunay ( struct mesh *  m,
struct behavior *  b 
)

Definition at line 10997 of file triangle.c.

Referenced by triangulate().

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

Definition at line 12011 of file triangle.c.

Referenced by constrainededge().

long divconqdelaunay ( struct mesh *  m,
struct behavior *  b 
)

Definition at line 9953 of file triangle.c.

Referenced by delaunay().

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

Definition at line 9726 of file triangle.c.

Referenced by divconqdelaunay().

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

Definition at line 4166 of file triangle.c.

Referenced by initializetrisubpools().

REAL estimate ( int  elen,
REAL e 
)
void exactinit ( )

Definition at line 4863 of file triangle.c.

Referenced by triangleinit().

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

Definition at line 4937 of file triangle.c.

Referenced by counterclockwiseadapt(), incircleadapt(), and orient3dadapt().

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 6494 of file triangle.c.

Referenced by writevoronoi().

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

Definition at line 11574 of file triangle.c.

Referenced by scoutsegment(), and segmentintersection().

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

Definition at line 7889 of file triangle.c.

Referenced by constrainededge(), delaunayfixup(), and triangulatepolygon().

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

Definition at line 12391 of file triangle.c.

Referenced by triangulate().

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

Definition at line 4555 of file triangle.c.

Referenced by formskeleton().

void highorder ( struct mesh *  m,
struct behavior *  b 
)

Definition at line 13694 of file triangle.c.

Referenced by triangulate().

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

Definition at line 5863 of file triangle.c.

Referenced by delaunayfixup(), insertvertex(), mergehulls(), nonregular(), and triangulatepolygon().

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

Definition at line 5284 of file triangle.c.

Referenced by incircle().

void infecthull ( struct mesh *  m,
struct behavior *  b 
)

Definition at line 12558 of file triangle.c.

Referenced by carveholes().

void initializetrisubpools ( struct mesh *  m,
struct behavior *  b 
)

Definition at line 4289 of file triangle.c.

Referenced by delaunay().

void initializevertexpool ( struct mesh *  m,
struct behavior *  b 
)

Definition at line 4246 of file triangle.c.

Referenced by transfernodes().

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

Definition at line 12233 of file triangle.c.

Referenced by formskeleton().

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

Definition at line 7785 of file triangle.c.

Referenced by constrainededge(), insertvertex(), markhull(), and scoutsegment().

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

Definition at line 8173 of file triangle.c.

Referenced by segmentintersection().

void internalerror ( )

Definition at line 3241 of file triangle.c.

Referenced by finddirection(), insertsegment(), and segmentintersection().

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

Definition at line 7614 of file triangle.c.

Referenced by carveholes(), insertsegment(), and insertvertex().

void makesubseg ( struct mesh *  m,
struct osub *  newsubseg 
)

Definition at line 4681 of file triangle.c.

Referenced by insertsubseg().

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

Definition at line 4637 of file triangle.c.

Referenced by divconqrecurse(), insertvertex(), and mergehulls().

void makevertexmap ( struct mesh *  m,
struct behavior *  b 
)

Definition at line 7375 of file triangle.c.

Referenced by formskeleton().

void markhull ( struct mesh *  m,
struct behavior *  b 
)

Definition at line 12345 of file triangle.c.

Referenced by formskeleton().

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 9399 of file triangle.c.

Referenced by divconqrecurse().

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

Definition at line 6453 of file triangle.c.

void numbernodes ( struct mesh *  m,
struct behavior *  b 
)

Definition at line 14445 of file triangle.c.

Referenced by triangulate().

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 6370 of file triangle.c.

Referenced by nonregular().

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

Definition at line 5945 of file triangle.c.

Referenced by orient3d().

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

Definition at line 3257 of file triangle.c.

Referenced by triangulate().

void plague ( struct mesh *  m,
struct behavior *  b 
)

Definition at line 12640 of file triangle.c.

Referenced by carveholes().

VOID* poolalloc ( struct memorypool *  pool)
void pooldealloc ( struct memorypool *  pool,
VOID dyingitem 
)

Definition at line 4042 of file triangle.c.

Referenced by subsegdealloc(), triangledealloc(), and vertexdealloc().

void pooldeinit ( struct memorypool *  pool)

Definition at line 3958 of file triangle.c.

Referenced by carveholes(), and triangledeinit().

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

Definition at line 3910 of file triangle.c.

Referenced by carveholes(), initializetrisubpools(), and initializevertexpool().

void poolrestart ( struct memorypool *  pool)

Definition at line 3864 of file triangle.c.

Referenced by insertvertex(), plague(), poolinit(), and regionplague().

void poolzero ( struct memorypool *  pool)

Definition at line 3830 of file triangle.c.

Referenced by triangleinit().

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

Definition at line 7470 of file triangle.c.

Referenced by insertvertex(), and locate().

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

Definition at line 3734 of file triangle.c.

Referenced by insertsubseg().

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

Definition at line 3640 of file triangle.c.

Referenced by divconqrecurse(), flip(), insertvertex(), mergehulls(), and unflip().

void quality_statistics ( struct mesh *  m,
struct behavior *  b 
)

Definition at line 15324 of file triangle.c.

Referenced by statistics().

unsigned long randomnation ( unsigned int  choices)

Definition at line 6647 of file triangle.c.

Referenced by locate(), vertexmedian(), and vertexsort().

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

Definition at line 12850 of file triangle.c.

Referenced by carveholes().

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

Definition at line 9890 of file triangle.c.

Referenced by divconqdelaunay().

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

Definition at line 5031 of file triangle.c.

Referenced by incircleadapt(), and orient3dadapt().

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

Definition at line 11797 of file triangle.c.

Referenced by constrainededge(), and insertsegment().

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

Definition at line 11669 of file triangle.c.

Referenced by constrainededge(), and scoutsegment().

void statistics ( struct mesh *  m,
struct behavior *  b 
)

Definition at line 15531 of file triangle.c.

Referenced by triangulate().

void subsegdealloc ( struct mesh *  m,
subseg dyingsubseg 
)

Definition at line 4402 of file triangle.c.

Referenced by plague().

subseg* subsegtraverse ( struct mesh *  m)

Definition at line 4423 of file triangle.c.

Referenced by writepoly().

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

Definition at line 14067 of file triangle.c.

Referenced by triangulate().

void traversalinit ( struct memorypool *  pool)
VOID* traverse ( struct memorypool *  pool)

Definition at line 4101 of file triangle.c.

Referenced by plague(), regionplague(), subsegtraverse(), triangletraverse(), and vertextraverse().

void triangledealloc ( struct mesh *  m,
triangle dyingtriangle 
)

Definition at line 4356 of file triangle.c.

Referenced by plague(), and removeghosts().

void triangledeinit ( struct mesh *  m,
struct behavior *  b 
)

Definition at line 4596 of file triangle.c.

Referenced by triangulate().

void triangleinit ( struct mesh *  m)

Definition at line 6608 of file triangle.c.

Referenced by triangulate().

triangle* triangletraverse ( struct mesh *  m)
void triangulate ( char *  triswitches,
struct triangulateio in,
struct triangulateio out,
struct triangulateio vorout 
)

Definition at line 15651 of file triangle.c.

Referenced by ROOT::Math::Delaunay2D::DoFindTriangles().

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

Definition at line 8834 of file triangle.c.

void triexit ( int  status)
void trifree ( VOID memptr)

Definition at line 1414 of file triangle.c.

Referenced by carveholes(), divconqdelaunay(), pooldeinit(), triangledeinit(), and triangulate().

VOID* trimalloc ( int  size)
int triunsuitable ( vertex  triorg,
vertex  tridest,
vertex  triapex,
REAL  area 
)

Definition at line 1336 of file triangle.c.

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

Definition at line 8024 of file triangle.c.

void vertexdealloc ( struct mesh *  m,
vertex  dyingvertex 
)

Definition at line 4448 of file triangle.c.

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

Definition at line 9257 of file triangle.c.

Referenced by alternateaxes().

void vertexsort ( vertex sortarray,
int  arraysize 
)

Definition at line 9183 of file triangle.c.

Referenced by divconqdelaunay().

vertex vertextraverse ( struct mesh *  m)

Definition at line 4469 of file triangle.c.

Referenced by divconqdelaunay(), numbernodes(), and writenodes().

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

Definition at line 14764 of file triangle.c.

Referenced by triangulate().

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

Definition at line 14477 of file triangle.c.

Referenced by triangulate().

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

Definition at line 15131 of file triangle.c.

Referenced by triangulate().

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

Definition at line 14305 of file triangle.c.

Referenced by triangulate().

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

Definition at line 14618 of file triangle.c.

Referenced by triangulate().

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

Definition at line 14918 of file triangle.c.

Referenced by triangulate().

Variable Documentation

REAL ccwerrboundA

Definition at line 619 of file triangle.c.

Referenced by counterclockwise(), and exactinit().

REAL ccwerrboundB

Definition at line 619 of file triangle.c.

Referenced by counterclockwiseadapt(), and exactinit().

REAL ccwerrboundC

Definition at line 619 of file triangle.c.

Referenced by counterclockwiseadapt(), and exactinit().

REAL epsilon

Definition at line 617 of file triangle.c.

Referenced by TMatrixTSparse< Element >::Allocate(), TMatrixTSym< Element >::Allocate(), TMatrixT< Element >::Allocate(), AlmostEqual(), AlmostInteger(), TMath::AreEqualAbs(), TTimeStamp::AsGAST(), TAttBBox::AssertBBoxExtents(), TAttBBox::BBoxZero(), TMVA::DecisionTree::BuildTree(), RooGExpModel::calcDecayConv(), RooGExpModel::calcSinConvNorm(), TMVA::PDEFoamMultiTarget::CalculateMean(), ClassImp(), closeEnough(), compare(), ROOT::Math::gv_detail::convert(), coordinates4D(), TF2::Covariance2XY(), TF3::Covariance3XY(), TF3::Covariance3XZ(), TF3::Covariance3YZ(), ROOT::Math::CylindricalEta3D< T >::CylindricalEta3D(), ROOT::Math::RichardsonDerivator::Derivative1(), ROOT::Math::RichardsonDerivator::Derivative2(), ROOT::Math::RichardsonDerivator::Derivative3(), ROOT::Math::RichardsonDerivator::DerivativeForward(), TMVA::ResultsRegression::DeviationAsAFunctionOf(), ROOT::Math::Inverter< idim, n >::DfactMatrix(), TDecompSVD::Diagonalize(), ROOT::Math::MultiNumGradFunction::DoDerivative(), TUnfold::DoUnfold(), TMath::Limits< T >::Epsilon(), equal(), ROOT::Math::Impl::Eta_FromRhoZ(), TMultiDimFit::EvalControl(), ROOT::Math::Util::EvalLog(), exactinit(), TMVA::PDEFoamDecisionTree::Explore(), ROOT::Math::expm1(), ROOT::Math::SinVariableTransformation::Ext2int(), ROOT::Minuit2::GaussDataGen::GaussDataGen(), TMVA::PDEFoamMultiTarget::GetCellValue(), TMVA::PDEFoam::GetCellValue(), TMVA::MethodBase::GetEfficiency(), TMVA::MethodBoost::GetMvaValue(), TMVA::MethodBDT::GetRegressionValues(), TMVA::ROCCalc::GetROC(), TMVA::Tools::GetSQRootMatrix(), TMVA::MethodBase::GetTrainingEfficiency(), TMVA::DecisionTree::GetVariableImportance(), RooAbsRealLValue::inRange(), IsEqual(), main(), TF1::Mean(), TF2::Mean2X(), TF2::Mean2Y(), TF3::Mean3X(), TF3::Mean3Y(), TF3::Mean3Z(), ROOT::Math::GSLMinimizer::Minimize(), TMVA::CCPruner::Optimize(), TMVA::CostComplexityPruneTool::Optimize(), TGaxis::PaintAxis(), TMVA::PDEFoam::PeekMax(), TMVA::MethodBDT::PrivateGetMvaValue(), TMVA::PDEFoamDiscriminant::Project2(), TKDTreeBinning::ReadjustMaxBinEdges(), TKDTreeBinning::ReadjustMinBinEdges(), RooStats::HypoTestInverterOriginal::RunAutoScan(), ROOT::Math::VavilovAccurate::Set(), TKDTreeBinning::SetCommonBinEdges(), RooStats::MCMCCalculator::SetKeysConfidenceAccuracy(), TBinomialEfficiencyFitter::SetPrecision(), TGLAxisPainter::SetTextFormat(), TMVA::SVWorkingSet::TakeStep(), TMVA::SVWorkingSet::TakeStepReg(), test16(), testUlpDiff(), TMVA::MethodCuts::Train(), TMVA::DecisionTree::TrainNodeFast(), TMatrixTSparse< Element >::Use(), TMVA::PDEFoam::Varedu(), TF1::Variance(), TF2::Variance2X(), TF2::Variance2Y(), TF3::Variance3X(), TF3::Variance3Y(), TF3::Variance3Z(), VerifyMatrixIdentity(), VerifyMatrixValue(), VerifyVectorIdentity(), and VerifyVectorValue().

REAL iccerrboundA

Definition at line 620 of file triangle.c.

Referenced by exactinit(), and incircle().

REAL iccerrboundB

Definition at line 620 of file triangle.c.

Referenced by exactinit(), and incircleadapt().

REAL iccerrboundC

Definition at line 620 of file triangle.c.

Referenced by exactinit(), and incircleadapt().

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

Definition at line 903 of file triangle.c.

Referenced by quality_statistics().

REAL o3derrboundA

Definition at line 621 of file triangle.c.

Referenced by exactinit(), and orient3d().

REAL o3derrboundB

Definition at line 621 of file triangle.c.

Referenced by exactinit(), and orient3dadapt().

REAL o3derrboundC

Definition at line 621 of file triangle.c.

Referenced by exactinit(), and orient3dadapt().

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

Definition at line 902 of file triangle.c.

Referenced by quality_statistics().

unsigned long randomseed

Definition at line 625 of file triangle.c.

Referenced by randomnation(), and triangleinit().

REAL resulterrbound

Definition at line 618 of file triangle.c.

Referenced by counterclockwiseadapt(), exactinit(), incircleadapt(), and orient3dadapt().

REAL splitter