65#define RT_SEG_NULL ((struct seg *)0)
67#define RT_CHECK_SEG(_p) BU_CKMAG(_p, RT_SEG_MAGIC, "struct seg")
68#define RT_CK_SEG(_p) BU_CKMAG(_p, RT_SEG_MAGIC, "struct seg")
70#define RT_GET_SEG(p, res) { \
71 while (!BU_LIST_WHILE((p), seg, &((res)->re_seg)) || !(p)) \
72 rt_alloc_seg_block(res); \
73 BU_LIST_DEQUEUE(&((p)->l)); \
74 (p)->l.forw = (p)->l.back = BU_LIST_NULL; \
75 (p)->seg_in.hit_magic = (p)->seg_out.hit_magic = RT_HIT_MAGIC; \
80#define RT_FREE_SEG(p, res) { \
82 BU_LIST_INSERT(&((res)->re_seg), &((p)->l)); \
92#define RT_FREE_SEG_LIST(_segheadp, _res) { \
93 register struct seg *_a; \
94 while (BU_LIST_WHILE(_a, seg, &((_segheadp)->l))) { \
95 BU_LIST_DEQUEUE(&(_a->l)); \
96 RT_FREE_SEG(_a, _res); \
Header file for the BRL-CAD common definitions.
void rt_pr_seg_vls(struct bu_vls *, const struct seg *)
void rt_pr_seg(const struct seg *segp)
Information about where a ray hits the surface.
struct hit seg_in
IN information.
struct hit seg_out
OUT information.
struct soltab * seg_stp
pointer back to soltab
fundamental vector, matrix, quaternion math macros