home *** CD-ROM | disk | FTP | other *** search
/ Qu-ake / Qu-ake.iso / qu_ke / editor / 017 / BRUSH.H < prev    next >
Encoding:
C/C++ Source or Header  |  1996-11-13  |  1.5 KB  |  57 lines

  1. /*======================================================================*/
  2. /* BRUSH.H */
  3. #include "mathlib.h"
  4. #include "readmap.h"
  5.  
  6. #define  MAX_FACES               16
  7. #define  BOGUS_RANGE             18000
  8. #define  MAX_POINTS_ON_WINDING   64
  9. #define  ON_EPSILON               0.1F           //F is force number to be used as float
  10. #define  FP_EPSILON               0.01           //eliminates compiler warnings 11-12-96
  11. #define  VECTOR_EPSILON           0.0001
  12. #define  SIDE_FRONT               0
  13. #define  SIDE_BACK                1
  14. #define  SIDE_ON                  2
  15. #define  M_PI                     3.14159265359  //missing from prior release 11-12-96
  16.  
  17. typedef struct
  18. {
  19.         char    texture[16];
  20.         float   rotate;
  21.         float   shift[2];
  22.         float   scale[2];
  23. } texturedef_t;
  24.  
  25. typedef float   vec5_t[5];
  26.  
  27. typedef struct
  28. {
  29.   int     numpoints;
  30.   vec5_t  points[8];  /*variable sized*/
  31. } winding_t;
  32.  
  33. typedef struct
  34. {
  35.         vec3_t          normal;
  36.         float           dist;
  37. } plane_t;
  38.  
  39. typedef struct
  40. {
  41.   /* implicit representation */
  42.   vec3_t          planepts[3];
  43.   texturedef_t    texture;
  44.  
  45.   /* cached representation */
  46.   plane_t                 plane;
  47.   float                   light;          /* 0 - 1.0 */
  48.   winding_t               *w;
  49. } face_t;
  50.  
  51. int        invalid;           /* not a proper polyhedron */
  52. vec3_t     bmins, bmaxs;
  53. face_t     faces[MAX_FACES];
  54. int        numfaces;
  55. face_t     *f;
  56. winding_t  *w;
  57.