]> icculus.org git repositories - icculus/iodoom3.git/blob - neo/tools/radiant/EditorBrush.h
Various Mac OS X tweaks to get this to build. Probably breaking things.
[icculus/iodoom3.git] / neo / tools / radiant / EditorBrush.h
1 /*
2 ===========================================================================
3
4 Doom 3 GPL Source Code
5 Copyright (C) 1999-2011 id Software LLC, a ZeniMax Media company. 
6
7 This file is part of the Doom 3 GPL Source Code (?Doom 3 Source Code?).  
8
9 Doom 3 Source Code is free software: you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation, either version 3 of the License, or
12 (at your option) any later version.
13
14 Doom 3 Source Code is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17 GNU General Public License for more details.
18
19 You should have received a copy of the GNU General Public License
20 along with Doom 3 Source Code.  If not, see <http://www.gnu.org/licenses/>.
21
22 In addition, the Doom 3 Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the Doom 3 Source Code.  If not, please request a copy in writing from id Software at the address below.
23
24 If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA.
25
26 ===========================================================================
27 */
28
29 // brush.h
30
31 brush_t *       Brush_Alloc();
32 void            Brush_Free (brush_t *b, bool bRemoveNode = true);
33 int                     Brush_MemorySize(brush_t *b);
34 void            Brush_MakeSided (int sides);
35 void            Brush_MakeSidedCone (int sides);
36 void            Brush_Move (brush_t *b, const idVec3 move, bool bSnap = true, bool updateOrigin = true);
37 int                     Brush_MoveVertex(brush_t *b, const idVec3 &vertex, const idVec3 &delta, idVec3 &end, bool bSnap);
38 void            Brush_ResetFaceOriginals(brush_t *b);
39 brush_t *       Brush_Parse (const idVec3 origin);
40 face_t *        Brush_Ray (idVec3 origin, idVec3 dir, brush_t *b, float *dist, bool testPrimitive = false);
41 void            Brush_RemoveFromList (brush_t *b);
42 void            Brush_AddToList (brush_t *b, brush_t *list);
43 void            Brush_Build(brush_t *b, bool bSnap = true, bool bMarkMap = true, bool bConvert = false, bool updateLights = true);
44 void            Brush_BuildWindings( brush_t *b, bool bSnap = true, bool keepOnPlaneWinding = false, bool updateLights = true, bool makeFacePlanes = true );
45 brush_t *       Brush_Clone (brush_t *b);
46 brush_t *       Brush_FullClone(brush_t *b);
47 brush_t *       Brush_Create (idVec3 mins, idVec3 maxs, texdef_t *texdef);
48 void            Brush_Draw( brush_t *b, bool bSelected = false);
49 void            Brush_DrawXY(brush_t *b, int nViewType, bool bSelected = false, bool ignoreViewType = false);
50 void            Brush_SplitBrushByFace (brush_t *in, face_t *f, brush_t **front, brush_t **back);
51 void            Brush_SelectFaceForDragging (brush_t *b, face_t *f, bool shear);
52 void            Brush_SetTexture (brush_t *b, texdef_t *texdef, brushprimit_texdef_t *brushprimit_texdef, bool bFitScale = false);
53 void            Brush_SideSelect (brush_t *b, idVec3 origin, idVec3 dir, bool shear);
54 void            Brush_SnapToGrid(brush_t *pb);
55 void            Brush_Rotate(brush_t *b, idVec3 vAngle, idVec3 vOrigin, bool bBuild = true);
56 void            Brush_MakeSidedSphere(int sides);
57 void            Brush_Write (brush_t *b, FILE *f, const idVec3 &origin, bool newFormat);
58 void            Brush_Write (brush_t *b, CMemFile* pMemFile, const idVec3 &origin, bool NewFormat);
59 void            Brush_RemoveEmptyFaces ( brush_t *b );
60 idWinding *     Brush_MakeFaceWinding (brush_t *b, face_t *face, bool keepOnPlaneWinding = false);
61 void            Brush_SetTextureName(brush_t *b, const char *name);
62 void            Brush_Print(brush_t* b);
63 void            Brush_FitTexture( brush_t *b, float height, float width );
64 void            Brush_SetEpair(brush_t *b, const char *pKey, const char *pValue);
65 const char *Brush_GetKeyValue(brush_t *b, const char *pKey);
66 const char *Brush_Name(brush_t *b);
67 void            Brush_RebuildBrush(brush_t *b, idVec3 vMins, idVec3 vMaxs, bool patch = true);
68 void            Brush_GetBounds( brush_t *b, idBounds &bo );
69
70 face_t *        Face_Alloc( void );
71 void            Face_Free( face_t *f );
72 face_t *        Face_Clone (face_t *f);
73 void            Face_MakePlane (face_t *f);
74 void            Face_Draw( face_t *face );
75 void            Face_TextureVectors (face_t *f, float STfromXYZ[2][4]);
76 void            Face_FitTexture( face_t * face, float height, float width );
77 void            SetFaceTexdef (brush_t *b, face_t *f, texdef_t *texdef, brushprimit_texdef_t *brushprimit_texdef, bool bFitScale = false);
78
79 int                     AddPlanept (idVec3 *f);