-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathphprops.h
120 lines (87 loc) · 2.3 KB
/
phprops.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
/*
@Copyright Looking Glass Studios, Inc.
1996,1997,1998,1999,2000 Unpublished Work.
*/
//////////////////////////////////////////////////////////////////////////////
// $Header: r:/t2repos/thief2/src/physics/phprops.h,v 1.23 2000/01/31 09:52:05 adurant Exp $
//
// Physics property structures
//
#pragma once
#ifndef __PHPROPS_H
#define __PHPROPS_H
#include <matrixs.h>
#include <sdesc.h>
#include <phmod.h>
////////////////////////////////////////
#define MAX_SUBMODELS (8) // max submodels any obj can have
#define MAX_PROP_SUBMODELS (2) // max submodels shown in the property
////////////////////////////////////////
enum eModelType
{
kOBBProp,
kSphereProp,
kSphereHatProp,
kNoneProp
};
////////////////////////////////////////
struct sPhysTypeProp
{
eModelType type;
int num_submodels;
BOOL remove_on_sleep;
BOOL special;
};
struct sPhysAttrProp
{
mxs_real gravity;
mxs_real mass;
mxs_real density;
mxs_real elasticity;
mxs_real base_friction;
mxs_vector cog_offset;
int rot_axes;
int rest_axes;
int climbable_sides;
BOOL edge_trigger;
mxs_real pore_size; //apparently BOOL is 4 bytes, so
//this struct is still aligned properly.
};
struct sPhysStateProp
{
mxs_vector location;
mxs_vector facing;
mxs_vector velocity;
mxs_vector rot_velocity;
};
enum eControlPropTypes
{
kCPT_AxisVelocity = 0x0001,
kCPT_Velocity = 0x0002,
kCPT_RotVelocity = 0x0004,
kCPT_Location = 0x0008,
kCPT_Rotation = 0x0010
};
struct sPhysControlProp
{
int control_prop_types;
mxs_vector axis_vel;
mxs_vector vel;
mxs_vector rot_vel;
};
struct sPhysDimsProp
{
mxs_real radius[MAX_PROP_SUBMODELS];
mxs_vector offset[MAX_PROP_SUBMODELS];
mxs_vector size;
BOOL pt_vs_terrain;
BOOL pt_vs_not_special;
};
////////////////////////////////////////
EXTERN sStructDesc *GetPhysTypeDesc();
EXTERN sStructDesc *GetPhysAttrDesc(ePhysModelType type = kPMT_Invalid);
EXTERN sStructDesc *GetPhysStateDesc();
EXTERN sStructDesc *GetPhysControlDesc();
EXTERN sStructDesc *GetPhysDimsDesc(ePhysModelType type = kPMT_Invalid);
////////////////////////////////////////
#endif