| 93 | } |
| 94 | |
| 95 | void xQuickCullForRay(xQCControl* ctrl, xQCData* q, const xRay3* r) |
| 96 | { |
| 97 | xLine3 ln; |
| 98 | |
| 99 | if (r->flags & 0x400) |
| 100 | { |
| 101 | xVec3 delta; |
| 102 | delta.x = r->dir.x * r->min_t, delta.y = r->dir.y * r->min_t, delta.z = r->dir.z * r->min_t; |
| 103 | ln.p1.x = r->origin.x + delta.x, ln.p1.y = r->origin.y + delta.y, |
| 104 | ln.p1.z = r->origin.z + delta.z; |
| 105 | } |
| 106 | else |
| 107 | { |
| 108 | ln.p1.x = r->origin.x, ln.p1.y = r->origin.y, ln.p1.z = r->origin.z; |
| 109 | } |
| 110 | |
| 111 | if (r->flags & 0x800) |
| 112 | { |
| 113 | F32 len; |
| 114 | if (r->flags & 0x400) |
| 115 | { |
| 116 | len = r->max_t - r->min_t; |
| 117 | } |
| 118 | else |
| 119 | { |
| 120 | len = r->max_t; |
| 121 | } |
| 122 | ln.p2.x = r->dir.x * len, ln.p2.y = r->dir.y * len, ln.p2.z = r->dir.z * len; |
| 123 | } |
| 124 | else |
| 125 | { |
| 126 | ln.p2.x = r->dir.x, ln.p2.y = r->dir.y, ln.p2.z = r->dir.z; |
| 127 | } |
| 128 | |
| 129 | ln.p2.x = ln.p1.x + ln.p2.x, ln.p2.y = ln.p1.y + ln.p2.y, ln.p2.z = ln.p1.z + ln.p2.z; |
| 130 | |
| 131 | xQCData a; |
| 132 | xQuickCullCellForVec(ctrl, &a, &ln.p1); |
| 133 | |
| 134 | xQCData b; |
| 135 | xQuickCullCellForVec(ctrl, &b, &ln.p2); |
| 136 | |
| 137 | xQuickCullCellMerge(q, &a, &b); |
| 138 | } |
| 139 | |
| 140 | void xQuickCullForSphere(xQCControl* ctrl, xQCData* q, const xSphere* s) |
| 141 | { |
nothing calls this directly
no test coverage detected