Intersection segment.
More...
Intersection segment.
A "seg" or segment is a low level in/out ray/shape intersection solution, derived by performing intersection calculations between a ray and a single object. Depending on the type of shape, a single ray may produce multiple segments when intersected with that shape. Unless the object happens to also be a top-level unioned object in the database, individual segments must be "woven" together using boolean hierarchies to obtain the final partitions which describe solid geometry along a ray. An individual segment may have either a positive or negative contribution to the "final" partition, depending on whether parent combs designate their children as unioned, intersected, or subtracted.
◆ RT_SEG_NULL
#define RT_SEG_NULL ((struct seg *)0) |
Definition at line 65 of file seg.h.
◆ RT_CHECK_SEG
Definition at line 67 of file seg.h.
◆ RT_CK_SEG
Definition at line 68 of file seg.h.
◆ RT_GET_SEG
#define RT_GET_SEG |
( |
|
p, |
|
|
|
res |
|
) |
| |
Value: { \
rt_alloc_seg_block(res); \
BU_LIST_DEQUEUE(&((p)->l)); \
(p)->seg_in.hit_magic = (p)->seg_out.hit_magic =
RT_HIT_MAGIC; \
res->re_segget++; \
}
#define BU_LIST_WHILE(p, structure, headp)
Definition at line 70 of file seg.h.
◆ RT_FREE_SEG
#define RT_FREE_SEG |
( |
|
p, |
|
|
|
res |
|
) |
| |
Value: { \
RT_CHECK_SEG(p); \
BU_LIST_INSERT(&((res)->re_seg), &((p)->l)); \
res->re_segfree++; \
}
Definition at line 80 of file seg.h.
◆ RT_FREE_SEG_LIST
#define RT_FREE_SEG_LIST |
( |
|
_segheadp, |
|
|
|
_res |
|
) |
| |
Value: { \
register
struct seg *_a; \
BU_LIST_DEQUEUE(&(_a->
l)); \
RT_FREE_SEG(_a, _res); \
} \
}
This could be BU_LIST_INSERT_LIST(&((_res)->re_seg), &((_segheadp)->l)) except for security of checking & counting each element this way.
Definition at line 92 of file seg.h.
◆ rt_pr_seg()
void rt_pr_seg |
( |
const struct seg * |
segp | ) |
|
◆ rt_pr_seg_vls()
void rt_pr_seg_vls |
( |
struct bu_vls * |
, |
|
|
const struct seg * |
|
|
) |
| |