BRL-CAD
|
Information about where a ray hits the surface. More...
Files | |
file | hit.h |
Data Structures | |
struct | hit |
Information about where a ray hits the surface. More... | |
struct | curvature |
struct | uvcoord |
Macros | |
#define | HIT_NULL ((struct hit *)0) |
#define | RT_CK_HIT(_p) BU_CKMAG(_p, RT_HIT_MAGIC, "struct hit") |
#define | RT_HIT_INIT_ZERO { RT_HIT_MAGIC, 0.0, VINIT_ZERO, VINIT_ZERO, VINIT_ZERO, NULL, 0, NULL } |
#define | RT_HIT_NORMAL(_normal, _hitp, _stp, _unused, _flipflag) |
#define | CURVE_NULL ((struct curvature *)0) |
#define | RT_CURVATURE_INIT_ZERO { VINIT_ZERO, 0.0, 0.0 } |
#define | RT_CURVATURE(_curvp, _hitp, _flipflag, _stp) |
#define | RT_HIT_UVCOORD(ap, _stp, _hitp, uvp) |
Functions | |
void | rt_pr_hit (const char *str, const struct hit *hitp) |
void | rt_pr_hit_vls (struct bu_vls *v, const char *str, const struct hit *hitp) |
void | rt_pr_hitarray_vls (struct bu_vls *v, const char *str, const struct hit *hitp, int count) |
Information about where a ray hits the surface.
The hit structure contains information about an individual boundary/ray intersection.
This is the lowest level of intersection information returned by LIBRT's intersection logic. Generally, multiple hits are used by higher level routines to construct segments (per shape) and partitions (boolean evaluations of multiple segments which constitute the actual portion of the ray deemed to have passed through solid geometry.)
#define RT_HIT_INIT_ZERO { RT_HIT_MAGIC, 0.0, VINIT_ZERO, VINIT_ZERO, VINIT_ZERO, NULL, 0, NULL } |
Compute normal into (_hitp)->hit_normal.
Set flip-flag accordingly depending on boolean logic, as one hit may be shared between multiple partitions with different flip status.
Example: box.r = box.s - sph.s; sph.r = sph.s
Return the post-boolean normal into caller-provided _normal vector.
#define RT_CURVATURE_INIT_ZERO { VINIT_ZERO, 0.0, 0.0 } |