]> de.git.xonotic.org Git - xonotic/netradiant.git/blob - radiant/select.h
basic architecture for game configuration at runtime. writes out a .game, no sanity...
[xonotic/netradiant.git] / radiant / select.h
1 /*
2 Copyright (C) 1999-2007 id Software, Inc. and contributors.
3 For a list of contributors, see the accompanying CONTRIBUTORS file.
4
5 This file is part of GtkRadiant.
6
7 GtkRadiant is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2 of the License, or
10 (at your option) any later version.
11
12 GtkRadiant is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with GtkRadiant; if not, write to the Free Software
19 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
20 */
21
22 typedef struct
23 {
24         brush_t         *brush;
25         face_t          *face;
26         float           dist;
27         qboolean        selected;
28 } trace_t;
29
30 #define SF_SELECTED_ONLY        0x0001
31 #define SF_ENTITIES_FIRST       0x0002
32 #define SF_SINGLEFACE                   0x0004
33 #define SF_IGNORECURVES         0x0008
34 #define SF_IGNOREGROUPS         0x0010
35 #define SF_CYCLE                                        0x0020
36 #define SF_CAMERA         0x0040 // set when the operation happens through camera view, otherwise XY
37 #define SF_DRAG_ON                              0x0080
38 #define SF_DRAG_OFF                     0x0100
39 #define SF_DRAG                                         (SF_DRAG_ON | SF_DRAG_OFF)
40
41 trace_t Test_Ray (vec3_t origin, vec3_t dir, int flags);
42
43 void Select_GetBounds (vec3_t mins, vec3_t maxs);
44 void Select_GetMid (vec3_t mid);
45 void Select_Brush (brush_t *b, bool bComplete = true, bool bStatus = true);
46 void Select_Ray (vec3_t origin, vec3_t dir, int flags);
47 void Select_Delete (void);
48 void Select_Deselect (bool bDeselectFaces = true);
49 void Select_Invert(void);
50 void Select_Clone (void);
51 void Select_Move (vec3_t delta, bool bSnap = true);
52 void Select_NudgePoint(vec3_t delta, qboolean bSnap = true);
53 void WINAPI Select_SetTexture (texdef_t *texdef, brushprimit_texdef_t *brushprimit_texdef, bool bFitScale = false, void* pPlugTexdef = NULL);
54 void Select_FlipAxis (int axis);
55 void Select_RotateAxis (int axis, float deg, bool bPaint = true, bool bMouse = false);
56 void Select_RealCompleteTall(vec3_t mins, vec3_t maxs);
57 void Select_CompleteTall (void);
58 void Select_PartialTall (void);
59 void Select_Touching (void);
60 void Select_Inside (void);
61 void Select_Seperate (void);
62 void Select_MakeStructural (void);
63 void Select_MakeDetail (void);
64 void Select_AllOfType();
65 void Select_Reselect();
66 void Select_FitTexture(int nHeight = 1, int nWidth = 1);
67
68 // absolute texture coordinates
69 // TTimo NOTE: this is stuff for old brushes format and rotation texture lock .. sort of in-between with bush primitives
70 void ComputeAbsolute(face_t* f, vec3_t& p1, vec3_t& p2, vec3_t& p3);
71 void AbsoluteToLocal(plane_t normal2, face_t* f, vec3_t& p1, vec3_t& p2, vec3_t& p3);
72 void Select_Hide();
73 void Select_ShowAllHidden();
74 // add selected brushes to a group, update the tree
75 //void Select_AddToGroup(const char *pName);
76 //void Select_Name(const char *pName);
77
78 // updating workzone to a given brush (depends on current view)
79 void UpdateWorkzone_ForBrush( brush_t* b );
80
81 void Select_GroupEntity(entity_t* e);
82 void Select_MergeEntity();