AaBspIntersectSegmentNode
function · models · primitive
- Address
0x6bc370· 903 bytes, up to0x6bc6f6- Signature
void __thiscall (void *this, uint32_t node, const float *segment, const float *box)- Meaning
- Descends a group's BSP with a segment and its box, splitting at each node, and intersects the leaves reached
- Confidence
- verified, proof one
- Finding
- models/wmo#bsp-segment-descent
- Test
models::aabsp_segment_clip_difftest,models::aabsp_segment_split_difftest
Finding: BSP segment descent in models: map objects
A group's BSP node is 16 bytes: a 16-bit flags word (0x4 leaf, low two bits the split axis), the
negative and positive children (+0x2, +0x4, 0xffff for none), the face count +0x6, the first
face reference +0x8, and the split distance +0xc. A segment descends with the node's box: it
stops when both ends lie more than 0.01 beyond the box on the split axis; with f0 and f1 the
ends' distances from the split, it visits both children whole when either is within 0.01, one
child when both are beyond 0.01 on one side, and otherwise splits at t = f0/(f0 − f1), the
start's side first. A leaf tests its cached mesh, else each face.
The derivation is in the doc.
Callers 2
- CMapObjGroup::IntersectSegment models
- CMapObjGroup::SegmentAnyHit models
Callees 5
- SetVector3 spline
- SubtractVector3 ui
- AddVector3 objectlayer
- CMapObjGroup::IntersectLeaf models
- AaBspIntersectLeaf models
Calls and jumps by a bare address, from tables/calls.tsv.