| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
typedef struct |
| 27 |
{ |
| 28 |
int numpoints; |
| 29 |
int maxpoints; |
| 30 |
float points[8][5]; |
| 31 |
} winding_t; |
| 32 |
|
| 33 |
|
| 34 |
|
| 35 |
#define MAXPOINTS 16 |
| 36 |
typedef struct face_s |
| 37 |
{ |
| 38 |
struct face_s *next; |
| 39 |
vec3_t planepts[3]; |
| 40 |
texdef_t texdef; |
| 41 |
|
| 42 |
plane_t plane; |
| 43 |
|
| 44 |
winding_t *face_winding; |
| 45 |
|
| 46 |
vec3_t d_color; |
| 47 |
qtexture_t *d_texture; |
| 48 |
|
| 49 |
|
| 50 |
|
| 51 |
} face_t; |
| 52 |
|
| 53 |
#define MAX_FACES 16 |
| 54 |
typedef struct brush_s |
| 55 |
{ |
| 56 |
struct brush_s *prev, *next; |
| 57 |
struct brush_s *oprev, *onext; |
| 58 |
struct entity_s *owner; |
| 59 |
vec3_t mins, maxs; |
| 60 |
|
| 61 |
face_t *brush_faces; |
| 62 |
} brush_t; |
| 63 |
|
| 64 |
|
| 65 |
void Brush_AddToList (brush_t *b, brush_t *list); |
| 66 |
void Brush_Build(brush_t *b); |
| 67 |
void Brush_BuildWindings( brush_t *b ); |
| 68 |
brush_t *Brush_Clone (brush_t *b); |
| 69 |
brush_t *Brush_Create (vec3_t mins, vec3_t maxs, texdef_t *texdef); |
| 70 |
void Brush_Draw( brush_t *b ); |
| 71 |
void Brush_DrawXY( brush_t *b ); |
| 72 |
void Brush_Free (brush_t *b); |
| 73 |
void Brush_MakeSided (int sides); |
| 74 |
void Brush_Move (brush_t *b, vec3_t move); |
| 75 |
brush_t *Brush_Parse (void); |
| 76 |
face_t *Brush_Ray (vec3_t origin, vec3_t dir, brush_t *b, float *dist); |
| 77 |
void Brush_RemoveFromList (brush_t *b); |
| 78 |
void Brush_SelectFaceForDragging (brush_t *b, face_t *f, qboolean shear); |
| 79 |
void Brush_SetTexture (brush_t *b, texdef_t *texdef); |
| 80 |
void Brush_SideSelect (brush_t *b, vec3_t origin, vec3_t dir, qboolean shear); |
| 81 |
void Brush_Write (brush_t *b, FILE *f); |
| 82 |
void Brush_RemoveEmptyFaces ( brush_t *b ); |
| 83 |
|
| 84 |
int AddPlanept (float *f); |
| 85 |
face_t *Face_Clone (face_t *f); |
| 86 |
void Face_Draw( face_t *face ); |
| 87 |
winding_t *MakeFaceWinding (brush_t *b, face_t *face); |