1 #ifndef __SHEW_PREDICATES__
2 #define __SHEW_PREDICATES__
8 extern double orient2d(
double *,
double*,
double*);
14 extern double orient3d(
double *,
double *,
double *,
double *);
17 extern double orient3d(
double *,
double *,
double *,
double *);
20 extern double incircle(
double *,
double *,
double *,
double *);
23 extern double iancirclefast(
double *,
double *,
double *,
double *);
26 extern double insphere(
double *,
double *,
double *,
double *,
double *);
29 extern double inspherefast(
double *,
double *,
double *,
double *,
double *);
34 inline double orient2d(
float *pa_,
float *pb_,
float *pc_)
36 double pa[2],pb[2],pc[2];
37 for (
int i=0; i<2; i++ )
43 return orient2d(&pa[0],&pb[0],&pc[0]);
47 inline double orient3d(
float *pa_,
float *pb_,
float *pc_,
float *pd_)
49 double pa[3],pb[3],pc[3],pd[3];
50 for (
int i=0; i<3; i++ )
57 return orient3d(&pa[0],&pb[0],&pc[0],&pd[0]);
61 inline double incircle(
float *pa_,
float *pb_,
float *pc_,
float *pd_)
63 double pa[2],pb[2],pc[2],pd[2];
64 for (
int i=0; i<2; i++ )
71 return incircle(&pa[0],&pb[0],&pc[0],&pd[0]);
75 inline double insphere(
float *pa_,
float *pb_,
float *pc_,
float *pd_,
float *pe_)
77 double pa[3],pb[3],pc[3],pd[3],pe[3];
78 for (
int i=0; i<3; i++ )
86 return insphere(&pa[0],&pb[0],&pc[0],&pd[0],&pe[0]);