MALOC 0.1
vpred.h
Go to the documentation of this file.
1
30#ifndef _VPRED_H_
31#define _VPRED_H_
32
33#include <maloc/maloc_base.h>
34
35/* random() prototype seems to be missing in <stdlib.h> */
36/*
37 * if !defined(VOSF1)
38 * extern long int random(void);
39 * endif
40 */
41
42/* On some machines, the exact arithmetic routines might be defeated by the */
43/* use of internal extended precision floating-point registers. Sometimes */
44/* this problem can be fixed by defining certain values to be volatile, */
45/* thus forcing them to be stored to memory and rounded off. This isn't */
46/* a great solution, though, as it slows the arithmetic down. */
47/* */
48/* To try this out, write "#define INEXACT volatile" below. Normally, */
49/* however, INEXACT should be defined to be nothing. ("#define INEXACT".) */
50
52#define INEXACT /* Nothing */
53/* #define INEXACT volatile */
54
56#define REAL double
57
59#define REALPRINT doubleprint
60
63#define REALRAND doublerand
64
67#define NARROWRAND narrowdoublerand
68
70#define UNIFORMRAND uniformdoublerand
71
84void Vpred_exactinit(void);
85
98
111
124
139REAL Vpred_orient3d(REAL *pa, REAL *pb, REAL *pc, REAL *pd);
140
156
172
185REAL Vpred_incircle(REAL *pa, REAL *pb, REAL *pc, REAL *pd);
186
200
214
228REAL Vpred_insphere(REAL *pa, REAL *pb, REAL *pc, REAL *pd, REAL *pe);
229
243REAL Vpred_inspherefast(REAL *pa, REAL *pb, REAL *pc, REAL *pd, REAL *pe);
244
258REAL Vpred_insphereexact(REAL *pa, REAL *pb, REAL *pc, REAL *pd, REAL *pe);
259
260#endif /* _VPRED_H_ */
261
The base (or foundation) header for MALOC.
REAL Vpred_orient2d(REAL *pa, REAL *pb, REAL *pc)
Adaptive exact 2D orientation test. Robust.
REAL Vpred_orient3dfast(REAL *pa, REAL *pb, REAL *pc, REAL *pd)
Approximate 3D orientation test. Nonrobust.
#define REAL
float or double
Definition vpred.h:56
REAL Vpred_orient3dexact(REAL *pa, REAL *pb, REAL *pc, REAL *pd)
Exact 3D orientation test. Robust.
REAL Vpred_inspherefast(REAL *pa, REAL *pb, REAL *pc, REAL *pd, REAL *pe)
Approximate 3D insphere test. Nonrobust.
REAL Vpred_orient3d(REAL *pa, REAL *pb, REAL *pc, REAL *pd)
Adaptive exact 3D orientation test. Robust.
REAL Vpred_insphereexact(REAL *pa, REAL *pb, REAL *pc, REAL *pd, REAL *pe)
Exact 3D insphere test. Robust.
void Vpred_exactinit(void)
Initialize the variables used for exact arithmetic.
REAL Vpred_incircleexact(REAL *pa, REAL *pb, REAL *pc, REAL *pd)
Exact 2D incircle test. Robust.
REAL Vpred_insphere(REAL *pa, REAL *pb, REAL *pc, REAL *pd, REAL *pe)
Adaptive exact 3D insphere test. Robust.
REAL Vpred_orient2dfast(REAL *pa, REAL *pb, REAL *pc)
Approximate 2D orientation test. Nonrobust.
REAL Vpred_orient2dexact(REAL *pa, REAL *pb, REAL *pc)
Exact 2D orientation test. Robust.
REAL Vpred_incircle(REAL *pa, REAL *pb, REAL *pc, REAL *pd)
Adaptive exact 2D incircle test. Robust.
REAL Vpred_incirclefast(REAL *pa, REAL *pb, REAL *pc, REAL *pd)
Approximate 2D incircle test. Nonrobust.