home *** CD-ROM | disk | FTP | other *** search
- /*======================================================================*/
- /* BRUSH.H */
- #include "mathlib.h"
- #include "readmap.h"
-
- #define MAX_FACES 16
- #define BOGUS_RANGE 18000
- #define MAX_POINTS_ON_WINDING 64
- #define ON_EPSILON 0.1F //F is force number to be used as float
- #define FP_EPSILON 0.01 //eliminates compiler warnings 11-12-96
- #define VECTOR_EPSILON 0.0001
- #define SIDE_FRONT 0
- #define SIDE_BACK 1
- #define SIDE_ON 2
- #define M_PI 3.14159265359 //missing from prior release 11-12-96
-
- typedef struct
- {
- char texture[16];
- float rotate;
- float shift[2];
- float scale[2];
- } texturedef_t;
-
- typedef float vec5_t[5];
-
- typedef struct
- {
- int numpoints;
- vec5_t points[8]; /*variable sized*/
- } winding_t;
-
- typedef struct
- {
- vec3_t normal;
- float dist;
- } plane_t;
-
- typedef struct
- {
- /* implicit representation */
- vec3_t planepts[3];
- texturedef_t texture;
-
- /* cached representation */
- plane_t plane;
- float light; /* 0 - 1.0 */
- winding_t *w;
- } face_t;
-
- int invalid; /* not a proper polyhedron */
- vec3_t bmins, bmaxs;
- face_t faces[MAX_FACES];
- int numfaces;
- face_t *f;
- winding_t *w;
-