37 #ifdef SINGLE_PRECISION 90 unsigned char pnbrs[2];
98 #define R2D_MAX_VERTS 64 122 const static r2d_int r2d_num_moments[3] = {1, 3, 6};
Perpendicular distances and bit flags for up to 6 faces.
Definition: r2d.h:80
r2d_real r2du_orient(r2d_rvec2 pa, r2d_rvec2 pb, r2d_rvec2 pc)
Get the signed area of the triangle defined by the input vertices.
Destination grid information.
Definition: r2d.h:107
int64_t r2d_long
Long integer type used for grid indexing.
Definition: r2d.h:51
r2d_orientation * orient
Definition: r2d.h:111
r2d_rvec2 n
Definition: r2d.h:73
r2d_dvec2 n
Definition: r2d.h:115
A polygon.
Definition: r2d.h:97
r2d_int polyorder
Definition: r2d.h:110
r2d_int funclip
Definition: r2d.h:101
void r2d_reduce(r2d_poly *poly, r2d_int polyorder, r2d_real *moments)
Integrate a polynomial density over a polygon using simplicial decomposition.
void r2du_faces_from_verts(r2d_rvec2 *verts, r2d_int nverts, r2d_plane *faces)
Get faces (unit normals and distances to the origin) from an ordered-vertex description of a convex p...
r2d_rvec2 d
Definition: r2d.h:116
r2d_int j
Definition: r2d.h:65
r2d_real d
Definition: r2d.h:74
r2d_int nverts
Definition: r2d.h:100
r2d_rvec2 pos
Definition: r2d.h:89
void r2du_init_box(r2d_poly *poly, r2d_rvec2 rbounds[2])
Initialize a polygon as an axis-aligned box.
Integer vector struct for grid indexing.
Definition: r2d.h:64
#define R2D_MAX_VERTS
Definition: r2d.h:98
r2d_long bufsz
Definition: r2d.h:114
void r2d_clip_quad(r2d_poly *poly, unsigned char andcmp)
Clip a polygon against four clip planes (find its intersection with a quadrilateral).
r2d_orientation orient
Definition: r2d.h:91
A plane.
Definition: r2d.h:72
unsigned char fflags
Definition: r2d.h:82
Vector struct.
Definition: r2d.h:56
void r2d_rasterize_quad(r2d_plane *faces, r2d_dest_grid *grid)
Rasterize a convex quadrilateral to the destination grid.
A doubly-linked vertex.
Definition: r2d.h:88
double r2d_real
Real type specifying the precision to be used in calculations.
Definition: r2d.h:40
r2d_real y
Definition: r2d.h:57
int32_t r2d_int
Integer type used for grid indexing and bit flags.
Definition: r2d.h:46