Debian Codegraph @

code/botlib/be_aas_bsp.h

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