Quake-III-Arena

Quake III Arena GPL Source Release
Log | Files | Refs

SELECT.H (3060B)


      1 /*
      2 ===========================================================================
      3 Copyright (C) 1999-2005 Id Software, Inc.
      4 
      5 This file is part of Quake III Arena source code.
      6 
      7 Quake III Arena source code is free software; you can redistribute it
      8 and/or modify it under the terms of the GNU General Public License as
      9 published by the Free Software Foundation; either version 2 of the License,
     10 or (at your option) any later version.
     11 
     12 Quake III Arena source code is distributed in the hope that it will be
     13 useful, 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 Foobar; if not, write to the Free Software
     19 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
     20 ===========================================================================
     21 */
     22 
     23 typedef enum
     24 {
     25 	sel_brush,
     26 	// sel_sticky_brush,
     27 	// sel_face,
     28 	sel_vertex,
     29 	sel_edge,
     30 	sel_singlevertex,
     31 	sel_curvepoint,
     32 	sel_area,
     33 	sel_terrainpoint,
     34 	sel_terraintexture,
     35 	sel_addpoint,			// for dropping points
     36 	sel_editpoint			// for editing points
     37 
     38 } select_t;
     39 
     40 typedef struct
     41 {
     42 	brush_t		*brush;
     43 	face_t		*face;
     44 	terrainFace_t	*terraface;
     45 	float		dist;
     46 	qboolean	selected;
     47 } trace_t;
     48 
     49 
     50 #define	SF_SELECTED_ONLY	 0x01
     51 #define	SF_ENTITIES_FIRST	 0x02
     52 #define	SF_SINGLEFACE		   0x04
     53 #define SF_IGNORECURVES    0x08
     54 #define SF_IGNOREGROUPS    0x10
     55 #define SF_CYCLE           0x20
     56 #define SF_CYCLEKEEP       0x40
     57 
     58 
     59 trace_t Test_Ray (vec3_t origin, vec3_t dir, int flags);
     60 
     61 void Select_GetBounds (vec3_t mins, vec3_t maxs);
     62 void Select_Brush (brush_t *b, bool bComplete = true, bool bStatus = true);
     63 void Select_Ray (vec3_t origin, vec3_t dir, int flags);
     64 void Select_Delete (void);
     65 void Select_Deselect (bool bDeselectFaces = true);
     66 void Select_Invert(void);
     67 void Select_Clone (void);
     68 void Select_Move (vec3_t delta, bool bSnap = true);
     69 void WINAPI Select_SetTexture (texdef_t *texdef, brushprimit_texdef_t *brushprimit_texdef, bool bFitScale = false, void* pPlugTexdef = NULL);
     70 void Select_FlipAxis (int axis);
     71 void Select_RotateAxis (int axis, float deg, bool bPaint = true, bool bMouse = false);
     72 void Select_CompleteTall (void);
     73 void Select_PartialTall (void);
     74 void Select_Touching (void);
     75 void Select_Inside (void);
     76 void Select_MakeStructural (void);
     77 void Select_MakeDetail (void);
     78 void Select_AllOfType();
     79 void Select_Reselect();
     80 void Select_FitTexture(int nHeight = 1, int nWidth = 1);
     81 
     82 // absolute texture coordinates
     83 // TTimo NOTE: this is stuff for old brushes format and rotation texture lock .. sort of in-between with bush primitives
     84 void ComputeAbsolute(face_t* f, vec3_t& p1, vec3_t& p2, vec3_t& p3);
     85 void AbsoluteToLocal(plane_t normal2, face_t* f, vec3_t& p1, vec3_t& p2, vec3_t& p3);
     86 void Select_Hide();
     87 void Select_ShowAllHidden();
     88 // add selected brushes to a group, update the tree
     89 void Select_AddToGroup(const char *pName);
     90 void Select_Name(const char *pName);
     91 void clearSelection();