]> de.git.xonotic.org Git - xonotic/netradiant.git/blobdiff - radiant/brush.h
This is a big big GTK file dialog change in Rambetter-temp-fixes branch.
[xonotic/netradiant.git] / radiant / brush.h
index dc0a66417eb893a75dba343237ecacc8ebaf8fda..08a5e057efe822ec7dcf82c5b8e148d4ea10d72e 100644 (file)
@@ -1,89 +1,89 @@
-/*\r
-Copyright (C) 1999-2007 id Software, Inc. and contributors.\r
-For a list of contributors, see the accompanying CONTRIBUTORS file.\r
-\r
-This file is part of GtkRadiant.\r
-\r
-GtkRadiant is free software; you can redistribute it and/or modify\r
-it under the terms of the GNU General Public License as published by\r
-the Free Software Foundation; either version 2 of the License, or\r
-(at your option) any later version.\r
-\r
-GtkRadiant is distributed in the hope that it will be useful,\r
-but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
-GNU General Public License for more details.\r
-\r
-You should have received a copy of the GNU General Public License\r
-along with GtkRadiant; if not, write to the Free Software\r
-Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA\r
-*/\r
-\r
-\r
-// brush.h\r
-\r
-// some usefull flags to control the behaviour of Brush_Build\r
-extern bool g_bBuildWindingsNoTexBuild;\r
-\r
-void           Brush_AddToList (brush_t *b, brush_t *lst);\r
-void           Brush_Build(brush_t *b, bool bSnap = true, bool bMarkMap = true, bool bConvert = false, bool bFilterTest = true);\r
-void    Brush_SetBuildWindingsNoTexBuild(bool bBuild);\r
-void           Brush_BuildWindings( brush_t *b, bool bSnap = true );\r
-brush_t*       Brush_Clone (brush_t *b);\r
-brush_t*       Brush_FullClone(brush_t *b);\r
-brush_t*       Brush_Create (vec3_t mins, vec3_t maxs, texdef_t *texdef);\r
-void    Brush_Resize(brush_t *b, vec3_t vMin, vec3_t vMax);\r
-void    Brush_FaceDraw(face_t *face, int nGLState);\r
-void           Brush_Draw( brush_t *b );\r
-void           Brush_DrawXY(brush_t *b, int nViewType);\r
-// set bRemoveNode to false to avoid trying to delete the item in group view tree control\r
-void           Brush_Free (brush_t *b, bool bRemoveNode = true);\r
-int                    Brush_MemorySize(brush_t *b);\r
-void           Brush_MakeSided (int sides);\r
-void           Brush_MakeSidedCone (int sides);\r
-void           Brush_Move (brush_t *b, const vec3_t move, bool bSnap = true);\r
-int            Brush_MoveVertex(brush_t *b, vec3_t vertex, vec3_t delta, vec3_t end, bool bSnap = true);\r
-void           Brush_ResetFaceOriginals(brush_t *b);\r
-face_t*                Brush_Ray (vec3_t origin, vec3_t dir, brush_t *b, float *dist, int nFlags = 0);\r
-void           Brush_RemoveFromList (brush_t *b);\r
-// bCaulk means the faces created during the operation will be caulked, this is used in conjunction with g_PrefsDlg.m_bClipCaulk\r
-void           Brush_SplitBrushByFace (brush_t *in, face_t *f, brush_t **front, brush_t **back, boolean bCaulk = false);\r
-void           Brush_SelectFaceForDragging (brush_t *b, face_t *f, qboolean shear);\r
-void           Brush_SetTexture (brush_t *b, texdef_t *texdef, brushprimit_texdef_t *brushprimit_texdef, bool bFitScale = false, IPluginTexdef* pPlugTexdef= (IPluginTexdef*)NULL);\r
-void           Brush_SideSelect (brush_t *b, vec3_t origin, vec3_t dir, qboolean shear);\r
-void           Brush_SnapToGrid(brush_t *pb);\r
-void           Brush_Rotate(brush_t *b, vec3_t vAngle, vec3_t vOrigin, bool bBuild = true);\r
-void           Brush_MakeSidedSphere(int sides);\r
-//void         Brush_Write (brush_t *b, FILE *f);\r
-//void         Brush_Write (brush_t *b, MemStream* pMemFile);\r
-void           Brush_RemoveEmptyFaces ( brush_t *b );\r
-winding_t*     Brush_MakeFaceWinding (brush_t *b, face_t *face);\r
-\r
-void Brush_RefreshShader(brush_t *b);\r
-\r
-int                    AddPlanept (float *f);\r
-float          SetShadeForPlane (plane_t *p);\r
-\r
-face_t* Face_Alloc( void );\r
-void           Face_Free( face_t *f );\r
-face_t* Face_Clone (face_t *f);\r
-void    Face_SetShader(face_t *face, const char *name);\r
-/*!\r
-faster version if you know the IShader already\r
-(instead of hash table lookup by name)\r
-*/\r
-void    Face_SetShader(face_t *face, IShader *shader);\r
-void    Face_MakePlane (face_t *f);\r
-void           Face_Draw( face_t *face );\r
-void           Face_TextureVectors (face_t *f, float STfromXYZ[2][4]);\r
-void           SetFaceTexdef (face_t *f, texdef_t *texdef, brushprimit_texdef_t *brushprimit_texdef, bool bFitScale = false, IPluginTexdef* pPlugTexdef = NULL );\r
-\r
-void Face_FitTexture( face_t * face, int nHeight, int nWidth );\r
-void Brush_FitTexture( brush_t *b, int nHeight, int nWidth );\r
-//void Brush_SetEpair(brush_t *b, const char *pKey, const char *pValue);\r
-//const char* Brush_GetKeyValue(brush_t *b, const char *pKey);\r
-brush_t *Brush_Alloc();\r
-const char* Brush_Name(brush_t *b);\r
-\r
-//eclass_t* HasModel(brush_t *b);\r
-void aabb_draw(const aabb_t *aabb, int mode);\r
+/*
+Copyright (C) 1999-2007 id Software, Inc. and contributors.
+For a list of contributors, see the accompanying CONTRIBUTORS file.
+
+This file is part of GtkRadiant.
+
+GtkRadiant is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+GtkRadiant is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GtkRadiant; if not, write to the Free Software
+Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+*/
+
+
+// brush.h
+
+// some usefull flags to control the behaviour of Brush_Build
+extern bool g_bBuildWindingsNoTexBuild;
+
+void           Brush_AddToList (brush_t *b, brush_t *lst);
+void           Brush_Build(brush_t *b, bool bSnap = true, bool bMarkMap = true, bool bConvert = false, bool bFilterTest = true);
+void    Brush_SetBuildWindingsNoTexBuild(bool bBuild);
+void           Brush_BuildWindings( brush_t *b, bool bSnap = true );
+brush_t*       Brush_Clone (brush_t *b);
+brush_t*       Brush_FullClone(brush_t *b);
+brush_t*       Brush_Create (vec3_t mins, vec3_t maxs, texdef_t *texdef);
+void    Brush_Resize(brush_t *b, vec3_t vMin, vec3_t vMax);
+void    Brush_FaceDraw(face_t *face, int nGLState);
+void           Brush_Draw( brush_t *b );
+void           Brush_DrawXY(brush_t *b, int nViewType);
+// set bRemoveNode to false to avoid trying to delete the item in group view tree control
+void           Brush_Free (brush_t *b, bool bRemoveNode = true);
+int                    Brush_MemorySize(brush_t *b);
+void           Brush_MakeSided (int sides);
+void           Brush_MakeSidedCone (int sides);
+void           Brush_Move (brush_t *b, const vec3_t move, bool bSnap = true);
+int            Brush_MoveVertex(brush_t *b, vec3_t vertex, vec3_t delta, vec3_t end, bool bSnap = true);
+void           Brush_ResetFaceOriginals(brush_t *b);
+face_t*                Brush_Ray (vec3_t origin, vec3_t dir, brush_t *b, float *dist, int nFlags = 0);
+void           Brush_RemoveFromList (brush_t *b);
+// bCaulk means the faces created during the operation will be caulked, this is used in conjunction with g_PrefsDlg.m_bClipCaulk
+void           Brush_SplitBrushByFace (brush_t *in, face_t *f, brush_t **front, brush_t **back, boolean bCaulk = false);
+void           Brush_SelectFaceForDragging (brush_t *b, face_t *f, qboolean shear);
+void           Brush_SetTexture (brush_t *b, texdef_t *texdef, brushprimit_texdef_t *brushprimit_texdef, bool bFitScale = false, IPluginTexdef* pPlugTexdef= (IPluginTexdef*)NULL);
+void           Brush_SideSelect (brush_t *b, vec3_t origin, vec3_t dir, qboolean shear);
+void           Brush_SnapToGrid(brush_t *pb);
+void           Brush_Rotate(brush_t *b, vec3_t vAngle, vec3_t vOrigin, bool bBuild = true);
+void           Brush_MakeSidedSphere(int sides);
+//void         Brush_Write (brush_t *b, FILE *f);
+//void         Brush_Write (brush_t *b, MemStream* pMemFile);
+void           Brush_RemoveEmptyFaces ( brush_t *b );
+winding_t*     Brush_MakeFaceWinding (brush_t *b, face_t *face);
+
+void Brush_RefreshShader(brush_t *b);
+
+int                    AddPlanept (float *f);
+float          SetShadeForPlane (plane_t *p);
+
+face_t* Face_Alloc( void );
+void           Face_Free( face_t *f );
+face_t* Face_Clone (face_t *f);
+void    Face_SetShader(face_t *face, const char *name);
+/*!
+faster version if you know the IShader already
+(instead of hash table lookup by name)
+*/
+void    Face_SetShader(face_t *face, IShader *shader);
+void    Face_MakePlane (face_t *f);
+void           Face_Draw( face_t *face );
+void           Face_TextureVectors (face_t *f, float STfromXYZ[2][4]);
+void           SetFaceTexdef (face_t *f, texdef_t *texdef, brushprimit_texdef_t *brushprimit_texdef, bool bFitScale = false, IPluginTexdef* pPlugTexdef = NULL );
+
+void Face_FitTexture( face_t * face, int nHeight, int nWidth );
+void Brush_FitTexture( brush_t *b, int nHeight, int nWidth );
+//void Brush_SetEpair(brush_t *b, const char *pKey, const char *pValue);
+//const char* Brush_GetKeyValue(brush_t *b, const char *pKey);
+brush_t *Brush_Alloc();
+const char* Brush_Name(brush_t *b);
+
+//eclass_t* HasModel(brush_t *b);
+void aabb_draw(const aabb_t *aabb, int mode);