Prev: B58A Up: Map Next: B66E
B638: What to do about a pair of boxes
27 addresses, indexed by the Z code (0 the candidate above, 1 overlapping, 2 IY above) + the V code (0 the candidate further back, 3 overlapping, 6 IY further back) + the U code (0 IY further back, 9 overlapping, 18 the candidate further back), as SORT_AND_DRAW works them out. "Further back" is smaller U, larger V, lower Z. The table is Knight Lore's, entry for entry.
Four outcomes. IY_GOES_FIRST when IY is behind or level with the candidate on all three axes and strictly behind on at least one: IY must be drawn first. CANDIDATE_ALREADY_FIRST for the mirror image, where the candidate is behind IY and is being drawn first anyway. ORDER_UNCONSTRAINED where each is in front of the other on some axis, which says nothing about their order. BOXES_INTERSECT, index 13, for boxes that overlap on every axis. The last three do the same thing.
DEPTH_ORDER B638 DEFW ORDER_UNCONSTRAINED 0 (Z0 V0 U0) no constraint; 1 (Z1 V0 U0) no constraint; 2 (Z2 V0 U0) no constraint; 3 (Z0 V3 U0) IY first
B63A DEFW ORDER_UNCONSTRAINED
B63C DEFW ORDER_UNCONSTRAINED
B63E DEFW IY_GOES_FIRST
B640 DEFW IY_GOES_FIRST 4 (Z1 V3 U0) IY first; 5 (Z2 V3 U0) no constraint; 6 (Z0 V6 U0) IY first; 7 (Z1 V6 U0) IY first
B642 DEFW ORDER_UNCONSTRAINED
B644 DEFW IY_GOES_FIRST
B646 DEFW IY_GOES_FIRST
B648 DEFW ORDER_UNCONSTRAINED 8 (Z2 V6 U0) no constraint; 9 (Z0 V0 U9) no constraint; 10 (Z1 V0 U9) candidate first; 11 (Z2 V0 U9) candidate first
B64A DEFW ORDER_UNCONSTRAINED
B64C DEFW CANDIDATE_ALREADY_FIRST
B64E DEFW CANDIDATE_ALREADY_FIRST
B650 DEFW IY_GOES_FIRST 12 (Z0 V3 U9) IY first; 13 (Z1 V3 U9) the boxes intersect; 14 (Z2 V3 U9) candidate first; 15 (Z0 V6 U9) IY first
B652 DEFW BOXES_INTERSECT
B654 DEFW CANDIDATE_ALREADY_FIRST
B656 DEFW IY_GOES_FIRST
B658 DEFW IY_GOES_FIRST 16 (Z1 V6 U9) IY first; 17 (Z2 V6 U9) no constraint; 18 (Z0 V0 U18) no constraint; 19 (Z1 V0 U18) candidate first
B65A DEFW ORDER_UNCONSTRAINED
B65C DEFW ORDER_UNCONSTRAINED
B65E DEFW CANDIDATE_ALREADY_FIRST
B660 DEFW CANDIDATE_ALREADY_FIRST 20 (Z2 V0 U18) candidate first; 21 (Z0 V3 U18) no constraint; 22 (Z1 V3 U18) candidate first; 23 (Z2 V3 U18) candidate first
B662 DEFW ORDER_UNCONSTRAINED
B664 DEFW CANDIDATE_ALREADY_FIRST
B666 DEFW CANDIDATE_ALREADY_FIRST
B668 DEFW ORDER_UNCONSTRAINED 24 (Z0 V6 U18) no constraint; 25 (Z1 V6 U18) no constraint; 26 (Z2 V6 U18) no constraint
B66A DEFW ORDER_UNCONSTRAINED
B66C DEFW ORDER_UNCONSTRAINED
Prev: B58A Up: Map Next: B66E