| 112 | } |
| 113 | |
| 114 | bool DoFacingCheck(vector *norm, g3Point **vertlist, vector *p) { |
| 115 | if (norm) { |
| 116 | // have normal |
| 117 | ASSERT(norm->x || norm->y || norm->z); |
| 118 | return g3_CheckNormalFacing(p, norm); |
| 119 | } else { |
| 120 | // normal not specified, so must compute |
| 121 | vector tempv; |
| 122 | // get three points (rotated) and compute normal |
| 123 | vm_GetPerp(&tempv, &vertlist[0]->p3_vec, &vertlist[1]->p3_vec, &vertlist[2]->p3_vec); |
| 124 | return ((tempv * vertlist[1]->p3_vec) < 0); |
| 125 | } |
| 126 | } |
| 127 | |
| 128 | // like g3_DrawPoly(), but checks to see if facing. If surface normal is |
| 129 | // NULL, this routine must compute it, which will be slow. It is better to |
no test coverage detected