2 Copyright (C) 1999-2007 id Software, Inc. and contributors.
\r
3 For a list of contributors, see the accompanying CONTRIBUTORS file.
\r
5 This file is part of GtkRadiant.
\r
7 GtkRadiant is free software; you can redistribute it and/or modify
\r
8 it under the terms of the GNU General Public License as published by
\r
9 the Free Software Foundation; either version 2 of the License, or
\r
10 (at your option) any later version.
\r
12 GtkRadiant is distributed in the hope that it will be useful,
\r
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
\r
15 GNU General Public License for more details.
\r
17 You should have received a copy of the GNU General Public License
\r
18 along with GtkRadiant; if not, write to the Free Software
\r
19 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
\r
25 // some usefull flags to control the behaviour of Brush_Build
\r
26 extern bool g_bBuildWindingsNoTexBuild;
\r
28 void Brush_AddToList (brush_t *b, brush_t *lst);
\r
29 void Brush_Build(brush_t *b, bool bSnap = true, bool bMarkMap = true, bool bConvert = false, bool bFilterTest = true);
\r
30 void Brush_SetBuildWindingsNoTexBuild(bool bBuild);
\r
31 void Brush_BuildWindings( brush_t *b, bool bSnap = true );
\r
32 brush_t* Brush_Clone (brush_t *b);
\r
33 brush_t* Brush_FullClone(brush_t *b);
\r
34 brush_t* Brush_Create (vec3_t mins, vec3_t maxs, texdef_t *texdef);
\r
35 void Brush_Resize(brush_t *b, vec3_t vMin, vec3_t vMax);
\r
36 void Brush_FaceDraw(face_t *face, int nGLState);
\r
37 void Brush_Draw( brush_t *b );
\r
38 void Brush_DrawXY(brush_t *b, int nViewType);
\r
39 // set bRemoveNode to false to avoid trying to delete the item in group view tree control
\r
40 void Brush_Free (brush_t *b, bool bRemoveNode = true);
\r
41 int Brush_MemorySize(brush_t *b);
\r
42 void Brush_MakeSided (int sides);
\r
43 void Brush_MakeSidedCone (int sides);
\r
44 void Brush_Move (brush_t *b, const vec3_t move, bool bSnap = true);
\r
45 int Brush_MoveVertex(brush_t *b, vec3_t vertex, vec3_t delta, vec3_t end, bool bSnap = true);
\r
46 void Brush_ResetFaceOriginals(brush_t *b);
\r
47 face_t* Brush_Ray (vec3_t origin, vec3_t dir, brush_t *b, float *dist, int nFlags = 0);
\r
48 void Brush_RemoveFromList (brush_t *b);
\r
49 // bCaulk means the faces created during the operation will be caulked, this is used in conjunction with g_PrefsDlg.m_bClipCaulk
\r
50 void Brush_SplitBrushByFace (brush_t *in, face_t *f, brush_t **front, brush_t **back, boolean bCaulk = false);
\r
51 void Brush_SelectFaceForDragging (brush_t *b, face_t *f, qboolean shear);
\r
52 void Brush_SetTexture (brush_t *b, texdef_t *texdef, brushprimit_texdef_t *brushprimit_texdef, bool bFitScale = false, IPluginTexdef* pPlugTexdef= (IPluginTexdef*)NULL);
\r
53 void Brush_SideSelect (brush_t *b, vec3_t origin, vec3_t dir, qboolean shear);
\r
54 void Brush_SnapToGrid(brush_t *pb);
\r
55 void Brush_Rotate(brush_t *b, vec3_t vAngle, vec3_t vOrigin, bool bBuild = true);
\r
56 void Brush_MakeSidedSphere(int sides);
\r
57 //void Brush_Write (brush_t *b, FILE *f);
\r
58 //void Brush_Write (brush_t *b, MemStream* pMemFile);
\r
59 void Brush_RemoveEmptyFaces ( brush_t *b );
\r
60 winding_t* Brush_MakeFaceWinding (brush_t *b, face_t *face);
\r
62 void Brush_RefreshShader(brush_t *b);
\r
64 int AddPlanept (float *f);
\r
65 float SetShadeForPlane (plane_t *p);
\r
67 face_t* Face_Alloc( void );
\r
68 void Face_Free( face_t *f );
\r
69 face_t* Face_Clone (face_t *f);
\r
70 void Face_SetShader(face_t *face, const char *name);
\r
72 faster version if you know the IShader already
\r
73 (instead of hash table lookup by name)
\r
75 void Face_SetShader(face_t *face, IShader *shader);
\r
76 void Face_MakePlane (face_t *f);
\r
77 void Face_Draw( face_t *face );
\r
78 void Face_TextureVectors (face_t *f, float STfromXYZ[2][4]);
\r
79 void SetFaceTexdef (face_t *f, texdef_t *texdef, brushprimit_texdef_t *brushprimit_texdef, bool bFitScale = false, IPluginTexdef* pPlugTexdef = NULL );
\r
81 void Face_FitTexture( face_t * face, int nHeight, int nWidth );
\r
82 void Brush_FitTexture( brush_t *b, int nHeight, int nWidth );
\r
83 //void Brush_SetEpair(brush_t *b, const char *pKey, const char *pValue);
\r
84 //const char* Brush_GetKeyValue(brush_t *b, const char *pKey);
\r
85 brush_t *Brush_Alloc();
\r
86 const char* Brush_Name(brush_t *b);
\r
88 //eclass_t* HasModel(brush_t *b);
\r
89 void aabb_draw(const aabb_t *aabb, int mode);
\r