12 CLIP_LEFT, CLIP_RIGHT,
13 CLIP_BOTTOM, CLIP_TOP,
17 /* Generic polygon clipper
19 * 1 -> fully inside, not clipped
20 * 0 -> straddling the plane and clipped
21 * -1 -> fully outside, not clipped
22 * in all cases, vertices are copied to vout, and the vertex count is written
23 * to wherever voutnum is pointing
25 int clip_poly(struct vertex *vout, int *voutnum,
26 const struct vertex *vin, int vnum, struct cplane *plane);
28 /* only checks if the polygon would be clipped by the plane, and classifies it
29 * as inside/outside/straddling, without actually producing a clipped polygon.
30 * return values are the same as clip_poly.
32 int check_clip_poly(const struct vertex *v, int vnum, struct cplane *plane);
34 /* Special-case frustum clipper (might be slightly faster) */
35 int clip_frustum(struct vertex *vout, int *voutnum,
36 const struct vertex *vin, int vnum, int fplane);
38 #endif /* POLYCLIP_H_ */