71#define HIT_NULL ((struct hit *)0)
72#define RT_CK_HIT(_p) BU_CKMAG(_p, RT_HIT_MAGIC, "struct hit")
73#define RT_HIT_INIT_ZERO { RT_HIT_MAGIC, 0.0, VINIT_ZERO, VINIT_ZERO, VINIT_ZERO, NULL, 0, NULL }
86#define RT_HIT_NORMAL(_normal, _hitp, _stp, _unused, _flipflag) { \
89 RT_CK_FUNCTAB((_stp)->st_meth); \
91 void *_n = (void *)_normal; \
92 if ((_stp)->st_meth->ft_norm) { \
93 (_stp)->st_meth->ft_norm(_hitp, _stp, (_hitp)->hit_rayp); \
96 int _f = (int)_flipflag; \
98 VREVERSE((fastf_t *)_normal, (_hitp)->hit_normal); \
100 VMOVE((fastf_t *)_normal, (_hitp)->hit_normal); \
123#define CURVE_NULL ((struct curvature *)0)
124#define RT_CURVATURE_INIT_ZERO { VINIT_ZERO, 0.0, 0.0 }
133#define RT_CURVATURE(_curvp, _hitp, _flipflag, _stp) { \
135 RT_CK_SOLTAB(_stp); \
136 RT_CK_FUNCTAB((_stp)->st_meth); \
137 if ((_stp)->st_meth->ft_curve) { \
138 (_stp)->st_meth->ft_curve(_curvp, _hitp, _stp); \
141 (_curvp)->crv_c1 = - (_curvp)->crv_c1; \
142 (_curvp)->crv_c2 = - (_curvp)->crv_c2; \
158#define RT_HIT_UVCOORD(ap, _stp, _hitp, uvp) { \
160 RT_CK_SOLTAB(_stp); \
161 RT_CK_FUNCTAB((_stp)->st_meth); \
162 if ((_stp)->st_meth->ft_uv) { \
163 (_stp)->st_meth->ft_uv(ap, _stp, _hitp, uvp); \
173 const struct hit *hitp);
176 const struct hit *hitp);
179 const struct hit *hitp,
Header file for the BRL-CAD common definitions.
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)
fastf_t vect_t[ELEMENTS_PER_VECT]
3-tuple vector
double fastf_t
fastest 64-bit (or larger) floating point type
fastf_t point_t[ELEMENTS_PER_POINT]
3-tuple point
Global registry of recognized magic numbers.
vect_t crv_pdir
Principle direction.
fastf_t crv_c1
curvature in principle dir
fastf_t crv_c2
curvature in other direction
Information about where a ray hits the surface.
vect_t hit_normal
DEPRECATED: Surface Normal at hit_point, use RT_HIT_NORMAL.
struct xray * hit_rayp
pointer to defining ray
point_t hit_point
DEPRECATED: Intersection point, use VJOIN1 hit_dist.
int hit_surfno
solid-specific surface indicator
vect_t hit_vpriv
PRIVATE vector for xxx_*()
fastf_t hit_dist
dist from r_pt to hit_point
void * hit_private
PRIVATE handle for xxx_shot()
Primary ray data structure.
fundamental vector, matrix, quaternion math macros