int cliptest_bbox(bbox_t bbox) { bboxf_t bv; bv[0] = (float)bbox[0]; bv[1] = (float)bbox[1]; bv[2] = (float)bbox[2]; bv[3] = (float)bbox[3]; bv[4] = (float)bbox[4]; bv[5] = (float)bbox[5]; return cliptest_bboxf(bv); }
int cliptest(Bounds bb) { bboxf_t bv; bv[0] = bb.max.x; bv[1] = bb.max.y; bv[2] = bb.max.z; bv[3] = bb.min.x; bv[4] = bb.min.y; bv[5] = bb.min.z; return cliptest_bboxf(bv); }
static int cliptest_bbox(r_context_t *c, bbox_t bbox) { bboxf_t bv; bv[0] = (float)bbox[0]; bv[1] = (float)bbox[1]; bv[2] = (float)bbox[2]; bv[3] = (float)bbox[3]; bv[4] = (float)bbox[4]; bv[5] = (float)bbox[5]; return cliptest_bboxf(c, bv); }
static void render_walk_face(r_context_t *c, int n) { face_t *face = &(g->r_faces[n]); /* Check if face is already included in the facelist */ if (c->r_faceinc[n]) return; c->r_faceinc[n] = 1; if (face->facetype == FACETYPE_NORMAL) { /* Face plane culling */ /* FIXME: This simple test is clearly not sufficient. Q3A gets a lot more culling at this point. */ /* Ignore this test for the time being if (vec_dot(face->v_norm, g->r_movedir) > cos_fov) return; */ } else if (face->facetype == FACETYPE_MESH) { /* Check bounding box for meshes */ if (!cliptest_bboxf(c, face->bbox)) return; } /* Check for sky flag */ if (g->r_shaders[face->shader].flags & SHADER_SKY) { /* Push to sky list */ c->skylist[c->numsky++] = n; } /* Check for transparent */ else if (g->r_shaders[face->shader].flags & SHADER_TRANSPARENT) { c->translist.faces[c->translist.numfaces].face = n; c->translist.faces[c->translist.numfaces++].sortkey = SORTKEY(face); } /* Normal face */ else { /* Push face to facelist */ c->facelist.faces[c->facelist.numfaces].face = n; c->facelist.faces[c->facelist.numfaces++].sortkey = SORTKEY(face); } }