|
BRL-CAD
|
Intersection segment. More...
Files | |
| file | seg.h |
Data Structures | |
| struct | seg |
Macros | |
| #define | RT_SEG_NULL ((struct seg *)0) |
| #define | RT_CHECK_SEG(_p) BU_CKMAG(_p, RT_SEG_MAGIC, "struct seg") |
| #define | RT_CK_SEG(_p) BU_CKMAG(_p, RT_SEG_MAGIC, "struct seg") |
| #define | RT_GET_SEG(p, res) |
| #define | RT_FREE_SEG(p, res) |
| #define | RT_FREE_SEG_LIST(_segheadp, _res) |
Functions | |
| void | rt_pr_seg (const struct seg *segp) |
| void | rt_pr_seg_vls (struct bu_vls *, const struct seg *) |
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.
This could be BU_LIST_INSERT_LIST(&((_res)->re_seg), &((_segheadp)->l)) except for security of checking & counting each element this way.