Debian Codegraph @

physics/collide.h

raw symbols SCIP
1 /*
2 * Descent 3
3 * Copyright (C) 2024 Parallax Software
4 *
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17
18 --- HISTORICAL COMMENTS FOLLOW ---
19
20 * $Logfile: /DescentIII/Main/lib/collide.h $
21 * $Revision: 15 $
22 * $Date: 6/10/99 6:41p $
23 * $Author: Chris $
24 *
25 * Descent III collide code
26 *
27 * $Log: /DescentIII/Main/lib/collide.h $
28 *
29 * 15 6/10/99 6:41p Chris
30 * Added ned_physics support
31 *
32 * 14 4/23/99 9:22p Matt
33 * Changed weapons to keep going after breaking glass.
34 *
35 * 13 4/14/99 3:59a Jeff
36 * fixed case mismatches in #includes
37 *
38 * 12 1/29/99 5:09p Chris
39 * Made changes for ROCKS
40 *
41 * 11 1/01/99 4:10p Chris
42 * Added some const parameters, improved ray cast object collide/rejection
43 * code
44 *
45 * 10 10/09/98 7:47p Chris
46 * Added ObjSetDeadFlag
47 *
48 * 9 6/15/98 7:01a Chris
49 * Cleaned out DII stuff and added new PhysicsSim extern's
50 *
51 * 8 5/07/98 2:22p Chris
52 * Hit die dot
53 *
54 * 7 5/05/98 3:42p Chris
55 * Code cleanup and fixed the collide_XXX_with_wall code. The wall_normal
56 * was know by fvi; so, it is passed to the function (instead of
57 * generating it again)
58 *
59 * 6 2/05/98 2:02p Chris
60 * Fixed the hitseg and hitwall in collide_object_with_wall and
61 * scrape_object_with_wall
62 *
63 * 5 10/21/97 4:15p Chris
64 * Incremental integration of the fvi/physics/collide code
65 *
66 * 4 10/20/97 11:55a Chris
67 * Added some support for the new collide system.
68 *
69 * 3 9/17/97 10:59a Chris
70 * Added a new way to compute radi
71 *
72 * 2 9/15/97 5:17a Chris
73 * Removed the Explosion Vclips since they do not play correctly in
74 * Hardware
75 * Added support for building collisons.
76 * working on SPhere to non-moving sphere collisions
77 *
78 * 5 3/15/97 1:29p Chris
79 *
80 * $NoKeywords: $
81 */
82
83 #ifndef COLLIDE_H
84 #define COLLIDE_Hcxx . . $ `physics/collide.h:84:9`!
85
86 #include <cstdint>
87
88 #include "findintersection.h"cxx . . $ `<file>/physics/findintersection.h`/
89 #include "object.h"cxx . . $ `<file>/Descent3/object.h`/
90 #include "vecmat.h"cxx . . $ `<file>/lib/vecmat.h`/
91
92 extern uint8_tcxx . . $ uint8_t# CollisionResultcxx . . $ CollisionResult.[MAX_OBJECT_TYPEScxx . . $ `Descent3/object_external.h:186:9`!][MAX_OBJECT_TYPEScxx . . $ `Descent3/object_external.h:186:9`!];
93 extern uint8_tcxx . . $ uint8_t# CollisionRayResultcxx . . $ CollisionRayResult.[MAX_OBJECT_TYPEScxx . . $ `Descent3/object_external.h:186:9`!];
94
95 void CollideInitcxx . . $ CollideInit(49f6e7a06ebc5aa8).();
96 void collide_two_objectscxx . . $ collide_two_objects(d2b59d3704ffac80).(objectcxx . . $ object# *A, objectcxx . . $ object# *B, vectorcxx . . $ vector# *collision_point, vectorcxx . . $ vector# *collision_normal,
97 fvi_infocxx . . $ fvi_info# *hit_info = nullptr);
98
99 // Process a collision between an object and a wall
100 // Returns true if the object hits the wall, and false if should keep going though the wall (for breakable glass)
101 bool collide_object_with_wallcxx . . $ collide_object_with_wall(df7a53499d66690e).(objectcxx . . $ object# *A, float hitspeed, int hitseg, int hitwall, vectorcxx . . $ vector# *hitpt, vectorcxx . . $ vector# *wall_normal,
102 float hit_dot);
103
104 extern void FindHitpointUVcxx . . $ FindHitpointUV(7a2228cd553a361c).(float *u, float *v, vectorcxx . . $ vector# *point, roomcxx . . $ room# *rp, int facenum);
105
106 void ConvertEulerToAxisAmountcxx . . $ ConvertEulerToAxisAmount(1430ddb085312116).(vectorcxx . . $ vector# *e, vectorcxx . . $ vector# *n, float *w);
107 void ConvertAxisAmountToEulercxx . . $ ConvertAxisAmountToEuler(541fdd6f774327be).(vectorcxx . . $ vector# *n, float *w, vectorcxx . . $ vector# *e);
108
109 void bump_obj_against_fixedcxx . . $ bump_obj_against_fixed(4f42c5e5dcf5b21f).(objectcxx . . $ object# *obj, vectorcxx . . $ vector# *collision_point, vectorcxx . . $ vector# *collision_normal);
110
111 #ifndef NED_PHYSICS
112 #define RESULT_NOTHINGcxx . . $ `physics/collide.h:112:9`! 0
113 #define RESULT_CHECK_SPHERE_SPHEREcxx . . $ `physics/collide.h:113:9`! 1
114 #define RESULT_CHECK_SPHERE_POLYcxx . . $ `physics/collide.h:114:9`! 2
115 #define RESULT_CHECK_POLY_SPHEREcxx . . $ `physics/collide.h:115:9`! 3
116 #define RESULT_CHECK_BBOX_POLYcxx . . $ `physics/collide.h:116:9`! 4
117 #define RESULT_CHECK_POLY_BBOXcxx . . $ `physics/collide.h:117:9`! 5
118 #define RESULT_CHECK_BBOX_BBOXcxx . . $ `physics/collide.h:118:9`! 6
119 #define RESULT_CHECK_BBOX_SPHEREcxx . . $ `physics/collide.h:119:9`! 7
120 #define RESULT_CHECK_SPHERE_BBOXcxx . . $ `physics/collide.h:120:9`! 8
121 #define RESULT_CHECK_SPHERE_ROOMcxx . . $ `physics/collide.h:121:9`! 9
122 #define RESULT_CHECK_BBOX_ROOMcxx . . $ `physics/collide.h:122:9`! 10
123 #endif
124
125 #endif