SELECT.H 3.0 KB

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