]> icculus.org git repositories - divverent/darkplaces.git/blob - collision.h
changed how QC interpreter handles edict field access - the entvars struct is now...
[divverent/darkplaces.git] / collision.h
1
2 #ifndef COLLISION_H
3 #define COLLISION_H
4
5 typedef struct
6 {
7         vec3_t  normal;
8         float   dist;
9 } plane_t;
10
11 typedef struct
12 {
13         // if true, the entire trace was in solid
14         qboolean        allsolid;
15         // if true, the initial point was in solid
16         qboolean        startsolid;
17         // if true, the trace passed through empty somewhere
18         qboolean        inopen;
19         // if true, the trace passed through water somewhere
20         qboolean        inwater;
21         // fraction of the total distance that was traveled before impact
22         // (1.0 = did not hit anything)
23         double          fraction;
24         // final position
25         double          endpos[3];
26         // surface normal at impact
27         plane_t         plane;
28         // entity the surface is on
29         void            *ent;
30         // if not zero, treats this value as empty, and all others as solid (impact
31         // on content change)
32         int                     startcontents;
33         // the contents that was hit at the end or impact point
34         int                     endcontents;
35 }
36 trace_t;
37
38 void Collision_RoundUpToHullSize(const model_t *cmodel, const vec3_t inmins, const vec3_t inmaxs, vec3_t outmins, vec3_t outmaxs);
39 void Collision_Init (void);
40 void Collision_ClipTrace (trace_t *trace, const void *cent, const model_t *cmodel, const vec3_t corigin, const vec3_t cangles, const vec3_t cmins, const vec3_t cmaxs, const vec3_t start, const vec3_t mins, const vec3_t maxs, const vec3_t end);
41
42 #endif