]> icculus.org git repositories - icculus/iodoom3.git/blob - neo/tools/radiant/PMESH.H
Various Mac OS X tweaks to get this to build. Probably breaking things.
[icculus/iodoom3.git] / neo / tools / radiant / PMESH.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 // patch stuff
30 patchMesh_t* MakeNewPatch(int width, int height);
31 brush_t* AddBrushForPatch(patchMesh_t *pm, bool bLinkToWorld = true);
32 brush_t* Patch_GenericMesh(int nWidth, int nHeight, int nOrientation = 2, bool bDeleteSource = true, bool bOverride = false, patchMesh_t *parent = NULL);
33 void Patch_ReadFile (char *name);
34 void Patch_WriteFile (char *name); 
35 void Patch_BuildPoints (brush_t *b);
36 void Patch_Move(patchMesh_t *p, const idVec3 vMove, bool bRebuild = false);
37 //++timo had to add a default value for bSnap (see Patch_ApplyMatrix call from Select_ApplyMatrix in select.cpp)
38 void Patch_ApplyMatrix(patchMesh_t *p, const idVec3 vOrigin, const idMat3 matrix, bool bSnap = false);
39 void Patch_EditPatch();
40 void Patch_Deselect();
41 void Patch_Deselect(patchMesh_t *p);
42 void Patch_Delete(patchMesh_t *p);
43 int  Patch_MemorySize(patchMesh_t *p);
44 void Patch_Select(patchMesh_t *p);
45 void Patch_Scale(patchMesh_t *p, const idVec3 vOrigin, const idVec3 vAmt, bool bRebuilt = true);
46 void Patch_Cleanup();
47 void Patch_SetView(int n);
48 void Patch_SetTexture(patchMesh_t *p, texdef_t *tex_def);
49 void Patch_SetTextureName(patchMesh_t *p, const char *name);
50 void Patch_BrushToMesh(bool bCone = false, bool bBevel = false, bool bEndcap = false, bool bSquare = false, int nHeight = 3);
51 bool Patch_DragScale(patchMesh_t *p, idVec3 vAmt, idVec3 vMove);
52 void Patch_ReadBuffer(char* pBuff, bool bSelect = false);
53 void Patch_WriteFile (CMemFile* pMemFile);
54 void Patch_UpdateSelected(idVec3 vMove);
55 void Patch_AddRow(patchMesh_t *p);
56 brush_t* Patch_Parse(bool bOld);
57 void Patch_Write (patchMesh_t *p, FILE *f);
58 void Patch_Write (patchMesh_t *p, CMemFile *file);
59 void Patch_AdjustColumns(patchMesh_t *p, int nCols);
60 void Patch_AdjustRows(patchMesh_t *p, int nRows);
61 void Patch_AdjustSelected(bool bInsert, bool bColumn, bool bFlag);
62 patchMesh_t* Patch_Duplicate(patchMesh_t *pFrom);
63 void Patch_RotateTexture(patchMesh_t *p, float fAngle);
64 void Patch_ScaleTexture(patchMesh_t *p, float fx, float fy, bool absolute);
65 void Patch_ShiftTexture(patchMesh_t *p, float fx, float fy, bool autoAdjust);
66 void Patch_DrawCam(patchMesh_t *p, bool selected);
67 void Patch_DrawXY(patchMesh_t *p);
68 void Patch_InsertColumn(patchMesh_t *p, bool bAdd);
69 void Patch_InsertRow(patchMesh_t *p, bool bAdd);
70 void Patch_RemoveRow(patchMesh_t *p, bool bFirst);
71 void Patch_RemoveColumn(patchMesh_t *p, bool bFirst);
72 void Patch_ToggleInverted();
73 void Patch_Restore(patchMesh_t *p);
74 void Patch_Save(patchMesh_t *p);
75 void Patch_SetTextureInfo(texdef_t* pt);
76 void Patch_NaturalTexturing();
77 void Patch_ResetTexturing(float fx, float fy);
78 void Patch_FitTexture(patchMesh_t *p, float fx, float fy);
79 void Patch_FitTexturing();
80 void Patch_BendToggle();
81 void Patch_StartInsDel();
82 void Patch_BendHandleTAB();
83 void Patch_BendHandleENTER();
84 void Patch_SelectBendNormal();
85 void Patch_SelectBendAxis();
86 patchMesh_t* SinglePatchSelected();
87 void Patch_CapCurrent(bool bInvertedBevel = false, bool bInvertedEndcap = false);
88 void Patch_DisperseRows();
89 void Patch_DisperseColumns();
90 void Patch_NaturalizeSelected(bool bCap = false, bool bCycleCap = false, bool alt = false);
91 void Patch_SubdivideSelected(bool subdivide, int horz, int vert);
92 void Patch_Naturalize(patchMesh_t *p, bool horz = true, bool vert = true, bool alt = false);
93 void Patch_SelectAreaPoints();
94 void Patch_InvertTexture(bool bY);
95 void Patch_InsDelToggle();
96 void Patch_InsDelHandleTAB();
97 void Patch_InsDelHandleENTER();
98 void Patch_SetOverlays();
99 void Patch_ClearOverlays();
100 void Patch_Thicken(int nAmount, bool bSeam);
101 void Patch_Transpose();
102 void Patch_Freeze();
103 void Patch_MakeDirty(patchMesh_t *p);
104 void Patch_UnFreeze(bool bAll);
105 const char* Patch_GetTextureName();
106 void Patch_FindReplaceTexture(brush_t *pb, const char *pFind, const char *pReplace, bool bForce);
107 void Patch_ReplaceQTexture(brush_t *pb, idMaterial *pOld, idMaterial *pNew);
108 void Select_SnapToGrid();
109 void Patch_FromTriangle(idVec5 vx, idVec5 vy, idVec5 vz);
110 const char* Patch_GetKeyValue(patchMesh_t *p, const char *pKey);
111 void Patch_SetEpair(patchMesh_t *p, const char *pKey, const char *pValue);
112 void Patch_FlipTexture(patchMesh_t *p, bool y);
113
114 bool WINAPI OnlyPatchesSelected();
115 bool WINAPI AnyPatchesSelected();
116 void WINAPI Patch_Rebuild(patchMesh_t *p);
117
118 extern bool g_bPatchShowBounds;
119 extern bool g_bPatchWireFrame;
120 extern bool g_bPatchWeld;
121 extern bool g_bPatchDrillDown;
122 extern bool g_bPatchInsertMode;
123 extern bool g_bPatchBendMode;
124 extern idVec3 g_vBendOrigin;