1 /*
2 ===========================================================================
3 Copyright (C) 1999-2005 Id Software, Inc.
4 Copyright (C) 2000-2006 Tim Angus
5 
6 This file is part of Tremulous.
7 
8 Tremulous is free software; you can redistribute it
9 and/or modify it under the terms of the GNU General Public License as
10 published by the Free Software Foundation; either version 2 of the License,
11 or (at your option) any later version.
12 
13 Tremulous is distributed in the hope that it will be
14 useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 GNU General Public License for more details.
17 
18 You should have received a copy of the GNU General Public License
19 along with Tremulous; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
21 ===========================================================================
22 */
23 
24 /*****************************************************************************
25  * name:		be_aas_sample.h
26  *
27  * desc:		AAS
28  *
29  * $Archive: /source/code/botlib/be_aas_sample.h $
30  *
31  *****************************************************************************/
32 
33 #ifdef AASINTERN
34 void AAS_InitAASLinkHeap(void);
35 void AAS_InitAASLinkedEntities(void);
36 void AAS_FreeAASLinkHeap(void);
37 void AAS_FreeAASLinkedEntities(void);
38 aas_face_t *AAS_AreaGroundFace(int areanum, vec3_t point);
39 aas_face_t *AAS_TraceEndFace(aas_trace_t *trace);
40 aas_plane_t *AAS_PlaneFromNum(int planenum);
41 aas_link_t *AAS_AASLinkEntity(vec3_t absmins, vec3_t absmaxs, int entnum);
42 aas_link_t *AAS_LinkEntityClientBBox(vec3_t absmins, vec3_t absmaxs, int entnum, int presencetype);
43 qboolean AAS_PointInsideFace(int facenum, vec3_t point, float epsilon);
44 qboolean AAS_InsideFace(aas_face_t *face, vec3_t pnormal, vec3_t point, float epsilon);
45 void AAS_UnlinkFromAreas(aas_link_t *areas);
46 #endif //AASINTERN
47 
48 //returns the mins and maxs of the bounding box for the given presence type
49 void AAS_PresenceTypeBoundingBox(int presencetype, vec3_t mins, vec3_t maxs);
50 //returns the cluster the area is in (negative portal number if the area is a portal)
51 int AAS_AreaCluster(int areanum);
52 //returns the presence type(s) of the area
53 int AAS_AreaPresenceType(int areanum);
54 //returns the presence type(s) at the given point
55 int AAS_PointPresenceType(vec3_t point);
56 //returns the result of the trace of a client bbox
57 aas_trace_t AAS_TraceClientBBox(vec3_t start, vec3_t end, int presencetype, int passent);
58 //stores the areas the trace went through and returns the number of passed areas
59 int AAS_TraceAreas(vec3_t start, vec3_t end, int *areas, vec3_t *points, int maxareas);
60 //returns the areas the bounding box is in
61 int AAS_BBoxAreas(vec3_t absmins, vec3_t absmaxs, int *areas, int maxareas);
62 //return area information
63 int AAS_AreaInfo( int areanum, aas_areainfo_t *info );
64 //returns the area the point is in
65 int AAS_PointAreaNum(vec3_t point);
66 //
67 int AAS_PointReachabilityAreaIndex( vec3_t point );
68 //returns the plane the given face is in
69 void AAS_FacePlane(int facenum, vec3_t normal, float *dist);
70 
71