37 #ifdef SINGLE_PRECISION 92 unsigned char pnbrs[3];
100 #define R3D_MAX_VERTS 64 124 const static r3d_int r3d_num_moments[3] = {1, 4, 10};
Perpendicular distances and bit flags for up to 6 faces.
Definition: r3d.h:82
r3d_rvec3 d
Definition: r3d.h:118
r3d_real d
Definition: r3d.h:76
r3d_rvec3 n
Definition: r3d.h:75
void r3du_tet_faces_from_verts(r3d_rvec3 *verts, r3d_plane *faces)
Get four faces (unit normals and distances to the origin) i from a four-vertex description of a tetra...
Integer vector struct for grid indexing.
Definition: r3d.h:65
r3d_int polyorder
Definition: r3d.h:112
r3d_int k
Definition: r3d.h:66
void r3du_init_box(r3d_poly *poly, r3d_rvec3 rbounds[2])
Initialize a polyhedron as an axis-aligned cube.
r3d_int funclip
Definition: r3d.h:103
void r3d_reduce(r3d_poly *poly, r3d_int polyorder, r3d_real *moments)
Integrate a polynomial density over a convex polyhedron using simplicial decomposition.
r3d_real r3du_orient(r3d_rvec3 pa, r3d_rvec3 pb, r3d_rvec3 pc, r3d_rvec3 pd)
Get the signed volume of the tetrahedron defined by the input vertices.
r3d_orientation orient
Definition: r3d.h:93
Vector struct.
Definition: r3d.h:56
r3d_real z
Definition: r3d.h:57
void r3d_clip_tet(r3d_poly *poly, unsigned char andcmp)
Clip a polyhedron against four clip planes (find its intersection with a tetrahedron).
Destination grid information.
Definition: r3d.h:109
unsigned char fflags
Definition: r3d.h:84
A plane.
Definition: r3d.h:74
r3d_int nverts
Definition: r3d.h:102
r3d_long bufsz
Definition: r3d.h:116
int32_t r3d_int
Integer type used for grid indexing and bit flags.
Definition: r3d.h:46
A polyhedron.
Definition: r3d.h:99
#define R3D_MAX_VERTS
Definition: r3d.h:100
r3d_orientation * orient
Definition: r3d.h:113
r3d_rvec3 pos
Definition: r3d.h:91
A doubly-linked vertex.
Definition: r3d.h:90
int64_t r3d_long
Long integer type used for grid indexing.
Definition: r3d.h:51
void r3d_voxelize_tet(r3d_plane *faces, r3d_dest_grid *grid)
Voxelize a tetrahedron to the destination grid.
double r3d_real
Real type specifying the precision to be used in calculations.
Definition: r3d.h:40
r3d_dvec3 n
Definition: r3d.h:117