be_aas_bsp.h 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  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. /*****************************************************************************
  19. * name: be_aas_bsp.h
  20. *
  21. * desc: AAS
  22. *
  23. * $Archive: /source/code/botlib/be_aas_bsp.h $
  24. *
  25. *****************************************************************************/
  26. #ifdef AASINTERN
  27. //loads the given BSP file
  28. int AAS_LoadBSPFile(void);
  29. //dump the loaded BSP data
  30. void AAS_DumpBSPData(void);
  31. //unlink the given entity from the bsp tree leaves
  32. void AAS_UnlinkFromBSPLeaves(bsp_link_t *leaves);
  33. //link the given entity to the bsp tree leaves of the given model
  34. bsp_link_t *AAS_BSPLinkEntity(vec3_t absmins,
  35. vec3_t absmaxs,
  36. int entnum,
  37. int modelnum);
  38. //calculates collision with given entity
  39. qboolean AAS_EntityCollision(int entnum,
  40. vec3_t start,
  41. vec3_t boxmins,
  42. vec3_t boxmaxs,
  43. vec3_t end,
  44. int contentmask,
  45. bsp_trace_t *trace);
  46. //for debugging
  47. void AAS_PrintFreeBSPLinks(char *str);
  48. //
  49. #endif //AASINTERN
  50. #define MAX_EPAIRKEY 128
  51. //trace through the world
  52. bsp_trace_t AAS_Trace( vec3_t start,
  53. vec3_t mins,
  54. vec3_t maxs,
  55. vec3_t end,
  56. int passent,
  57. int contentmask);
  58. //returns the contents at the given point
  59. int AAS_PointContents(vec3_t point);
  60. //returns true when p2 is in the PVS of p1
  61. qboolean AAS_inPVS(vec3_t p1, vec3_t p2);
  62. //returns true when p2 is in the PHS of p1
  63. qboolean AAS_inPHS(vec3_t p1, vec3_t p2);
  64. //returns true if the given areas are connected
  65. qboolean AAS_AreasConnected(int area1, int area2);
  66. //creates a list with entities totally or partly within the given box
  67. int AAS_BoxEntities(vec3_t absmins, vec3_t absmaxs, int *list, int maxcount);
  68. //gets the mins, maxs and origin of a BSP model
  69. void AAS_BSPModelMinsMaxsOrigin(int modelnum, vec3_t angles, vec3_t mins, vec3_t maxs, vec3_t origin);
  70. //handle to the next bsp entity
  71. int AAS_NextBSPEntity(int ent);
  72. //return the value of the BSP epair key
  73. int AAS_ValueForBSPEpairKey(int ent, char *key, char *value, int size);
  74. //get a vector for the BSP epair key
  75. int AAS_VectorForBSPEpairKey(int ent, char *key, vec3_t v);
  76. //get a float for the BSP epair key
  77. int AAS_FloatForBSPEpairKey(int ent, char *key, float *value);
  78. //get an integer for the BSP epair key
  79. int AAS_IntForBSPEpairKey(int ent, char *key, int *value);