]> de.git.xonotic.org Git - xonotic/netradiant.git/blob - radiant/select.h
reformat code! now the code is only ugly on the *inside*
[xonotic/netradiant.git] / radiant / select.h
1 /*
2    Copyright (C) 1999-2006 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 #if !defined( INCLUDED_SELECT_H )
23 #define INCLUDED_SELECT_H
24
25 #include "math/vector.h"
26
27 void Select_GetBounds(Vector3 &mins, Vector3 &maxs);
28
29 void Select_GetMid(Vector3 &mid);
30
31 void Select_Delete();
32
33 void Select_Invert();
34
35 void Select_Inside();
36
37 void Select_Touching();
38
39 void Scene_ExpandSelectionToEntities();
40
41 void Selection_Flipx();
42
43 void Selection_Flipy();
44
45 void Selection_Flipz();
46
47 void Selection_Rotatex();
48
49 void Selection_Rotatey();
50
51 void Selection_Rotatez();
52
53
54 void Selection_MoveDown();
55
56 void Selection_MoveUp();
57
58 void Select_AllOfType();
59
60 void DoRotateDlg();
61
62 void DoScaleDlg();
63
64
65 void Select_SetShader(const char *shader);
66
67 class TextureProjection;
68
69 void Select_SetTexdef(const TextureProjection &projection);
70
71 class ContentsFlagsValue;
72
73 void Select_SetFlags(const ContentsFlagsValue &flags);
74
75 void Select_RotateTexture(float amt);
76
77 void Select_ScaleTexture(float x, float y);
78
79 void Select_ShiftTexture(float x, float y);
80
81 void Select_FitTexture(float horizontal = 1, float vertical = 1);
82
83 void FindReplaceTextures(const char *pFind, const char *pReplace, bool bSelected);
84
85 void HideSelected();
86
87 void Select_ShowAllHidden();
88
89 // updating workzone to a given brush (depends on current view)
90
91 void Selection_construct();
92
93 void Selection_destroy();
94
95
96 struct select_workzone_t {
97     // defines the boundaries of the current work area
98     // is used to guess brushes and drop points third coordinate when creating from 2D view
99     Vector3 d_work_min, d_work_max;
100
101     select_workzone_t() :
102             d_work_min(-64.0f, -64.0f, -64.0f),
103             d_work_max(64.0f, 64.0f, 64.0f)
104     {
105     }
106 };
107
108 const select_workzone_t &Select_getWorkZone();
109
110 #endif