projects
/
dosdemo
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
adding polyclip.obj to the watcom makefile
[dosdemo]
/
src
/
polyclip.h
diff --git
a/src/polyclip.h
b/src/polyclip.h
index
c6745e3
..
0b460cf
100644
(file)
--- a/
src/polyclip.h
+++ b/
src/polyclip.h
@@
-8,7
+8,13
@@
struct cplane {
float nx, ny, nz;
};
float nx, ny, nz;
};
-/* Polygon clipper
+enum {
+ CLIP_LEFT, CLIP_RIGHT,
+ CLIP_BOTTOM, CLIP_TOP,
+ CLIP_NEAR, CLIP_FAR
+};
+
+/* Generic polygon clipper
* returns:
* 1 -> fully inside, not clipped
* 0 -> straddling the plane and clipped
* returns:
* 1 -> fully inside, not clipped
* 0 -> straddling the plane and clipped
@@
-19,4
+25,8
@@
struct cplane {
int clip_poly(struct g3d_vertex *vout, int *voutnum,
const struct g3d_vertex *vin, int vnum, struct cplane *plane);
int clip_poly(struct g3d_vertex *vout, int *voutnum,
const struct g3d_vertex *vin, int vnum, struct cplane *plane);
+/* Special-case frustum clipper (might be slightly faster) */
+int clip_frustum(struct g3d_vertex *vout, int *voutnum,
+ const struct g3d_vertex *vin, int vnum, int fplane);
+
#endif /* POLYCLIP_H_ */
#endif /* POLYCLIP_H_ */