select.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. /*
  2. ===========================================================================
  3. Copyright (C) 1997-2006 Id Software, Inc.
  4. This file is part of Quake 2 Tools source code.
  5. Quake 2 Tools 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 2 Tools 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 Quake 2 Tools source code; 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. } select_t;
  26. typedef struct
  27. {
  28. brush_t *brush;
  29. face_t *face;
  30. float dist;
  31. qboolean selected;
  32. } trace_t;
  33. #define SF_SELECTED_ONLY 1
  34. #define SF_ENTITIES_FIRST 2
  35. #define SF_SINGLEFACE 4
  36. trace_t Test_Ray (vec3_t origin, vec3_t dir, int flags);
  37. void Select_GetBounds (vec3_t mins, vec3_t maxs);
  38. void Select_Brush (brush_t *b);
  39. void Select_Ray (vec3_t origin, vec3_t dir, int flags);
  40. void Select_Delete (void);
  41. void Select_Deselect (void);
  42. void Select_Clone (void);
  43. void Select_Move (vec3_t delta);
  44. void Select_SetTexture (texdef_t *texdef);
  45. void Select_FlipAxis (int axis);
  46. void Select_RotateAxis (int axis, float deg);
  47. void Select_CompleteTall (void);
  48. void Select_PartialTall (void);
  49. void Select_Touching (void);
  50. void Select_Inside (void);
  51. void Select_MakeStructural (void);
  52. void Select_MakeDetail (void);