|
| #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 /* Number of encroached subsegments allocated at once. */ |
| |
| #define | BADTRIPERBLOCK 4092 /* Number of skinny triangles allocated at once. */ |
| |
| #define | FLIPSTACKERPERBLOCK 252 /* Number of flipped triangles allocated at once. */ |
| |
| #define | SPLAYNODEPERBLOCK 508 /* Number of splay tree nodes allocated at once. */ |
| |
| #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) ((float *) (otri).tri)[m->elemattribindex + (attnum)] |
| |
| #define | setelemattribute(otri, attnum, value) ((float *) (otri).tri)[m->elemattribindex + (attnum)] = value |
| |
| #define | areabound(otri) ((float *) (otri).tri)[m->areaboundindex] |
| |
| #define | setareabound(otri, value) ((float *) (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 | 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) |
| |
|
| void | triexit (int status) |
| |
| int * | trimalloc (int size) |
| |
| void | trifree (int *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) |
| |
| int * | poolalloc (struct memorypool *pool) |
| |
| void | pooldealloc (struct memorypool *pool, int *dyingitem) |
| |
| void | traversalinit (struct memorypool *pool) |
| |
| int * | traverse (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) |
| |
| triangle * | triangletraverse (struct mesh *m) |
| |
| void | subsegdealloc (struct mesh *m, subseg *dyingsubseg) |
| |
| subseg * | subsegtraverse (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, float *e, int flen, float *f, float *h) |
| |
| int | scale_expansion_zeroelim (int elen, float *e, float b, float *h) |
| |
| float | estimate (int elen, float *e) |
| |
| float | counterclockwiseadapt (vertex pa, vertex pb, vertex pc, float detsum) |
| |
| float | counterclockwise (struct mesh *m, struct behavior *b, vertex pa, vertex pb, vertex pc) |
| |
| float | incircleadapt (vertex pa, vertex pb, vertex pc, vertex pd, float permanent) |
| |
| float | incircle (struct mesh *m, struct behavior *b, vertex pa, vertex pb, vertex pc, vertex pd) |
| |
| float | orient3dadapt (vertex pa, vertex pb, vertex pc, vertex pd, float aheight, float bheight, float cheight, float dheight, float permanent) |
| |
| float | orient3d (struct mesh *m, struct behavior *b, vertex pa, vertex pb, vertex pc, vertex pd, float aheight, float bheight, float cheight, float dheight) |
| |
| float | 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, float *xi, float *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, float attribute, float area) |
| |
| void | carveholes (struct mesh *m, struct behavior *b, float *holelist, int holes, float *regionlist, int regions) |
| |
| void | highorder (struct mesh *m, struct behavior *b) |
| |
| void | transfernodes (struct mesh *m, struct behavior *b, float *pointlist, float *pointattriblist, int *pointmarkerlist, int numberofpoints, int numberofpointattribs) |
| |
| void | writenodes (struct mesh *m, struct behavior *b, float **pointlist, float **pointattriblist, int **pointmarkerlist) |
| |
| void | numbernodes (struct mesh *m, struct behavior *b) |
| |
| void | writeelements (struct mesh *m, struct behavior *b, int **trianglelist, float **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, float **vpointlist, float **vpointattriblist, int **vpointmarkerlist, int **vedgelist, int **vedgemarkerlist, float **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) |
| |