0
|
1 #pragma once
|
|
2
|
|
3 typedef unsigned __int32 uint;
|
|
4
|
|
5 #pragma pack(push, 1)
|
|
6 struct Vec2_short_
|
|
7 {
|
|
8 __int16 x;
|
|
9 __int16 y;
|
|
10 };
|
|
11 #pragma pack(pop)
|
|
12
|
|
13 #pragma pack(push, 1)
|
|
14 struct Vec3_float_
|
|
15 {
|
|
16 void Normalize();
|
|
17
|
|
18
|
|
19 //----- (0049B32D) --------------------------------------------------------
|
|
20 static Vec3_float_ *Vec3_float_::Cross(Vec3_float_ *v1, Vec3_float_ *pOut, float x, float y, float z)
|
|
21 {
|
|
22 double v6; // st7@1
|
|
23 double v7; // st6@1
|
|
24
|
|
25 v6 = x * v1->z - z * v1->x;
|
|
26 v7 = y * v1->x - x * v1->y;
|
|
27 pOut->x = z * v1->y - y * v1->z;
|
|
28 pOut->y = v6;
|
|
29 pOut->z = v7;
|
|
30 return pOut;
|
|
31 }
|
|
32
|
|
33 //----- (0049B02E) --------------------------------------------------------
|
|
34 inline static float NegDot(Vec3_float_ *a1, Vec3_float_ *a2, float *a3)
|
|
35 {
|
|
36 return *a3 = -(a1->z * a2->z + a1->y * a2->y + a1->x * a2->x);
|
|
37 }
|
|
38
|
|
39 float x;
|
|
40 float y;
|
|
41 float z;
|
|
42 };
|
|
43 #pragma pack(pop)
|
|
44
|
|
45
|
|
46 #pragma pack(push, 1)
|
|
47 struct Vec2_int_
|
|
48 {
|
|
49 int x;
|
|
50 int y;
|
|
51 };
|
|
52 #pragma pack(pop)
|
|
53
|
|
54 #pragma pack(push, 1)
|
|
55 struct Vec2_float_
|
|
56 {
|
|
57 float x;
|
|
58 float y;
|
|
59 };
|
|
60 #pragma pack(pop)
|
|
61
|
|
62
|
|
63 #pragma pack(push, 1)
|
|
64 struct Vec3_short_
|
|
65 {
|
|
66 __int16 x;
|
|
67 __int16 y;
|
|
68 __int16 z;
|
|
69 };
|
|
70 #pragma pack(pop)
|
|
71
|
|
72 #pragma pack(push, 1)
|
|
73 struct Vec3_int_
|
|
74 {
|
|
75 inline Vec3_int_():
|
|
76 x(0), y(0), z(0)
|
|
77 {}
|
|
78 inline Vec3_int_(int a, int b = 0, int c = 0):
|
|
79 x(a), y(b), z(c)
|
|
80 {}
|
|
81
|
|
82 void Normalize_float();
|
|
83
|
|
84 static void __fastcall Rotate(int sDepth, int sRotY, int sRotX, Vec3_int_ v, int *outx, int *outy, int *outz);
|
|
85 static void Normalize(int *x, int *y, int *z);
|
|
86
|
|
87 int x;
|
|
88 int y;
|
|
89 int z;
|
|
90 };
|
|
91 #pragma pack(pop)
|
|
92
|
|
93 #pragma pack(push, 1)
|
|
94 struct Vec4_int_
|
|
95 {
|
|
96 int x;
|
|
97 int y;
|
|
98 int z;
|
|
99 int w;
|
|
100 };
|
|
101 #pragma pack(pop)
|
|
102
|
|
103
|
|
104
|
|
105
|
|
106
|
|
107
|
|
108 /* 82 */
|
|
109 #pragma pack(push, 1)
|
|
110 struct Plane_int_
|
|
111 {
|
|
112 Vec3_int_ vNormal;
|
|
113 int dist;
|
|
114 };
|
|
115 #pragma pack(pop)
|
|
116
|
|
117
|
|
118 #pragma pack(push, 1)
|
|
119 struct BBox_short_
|
|
120 {
|
|
121 __int16 x1;
|
|
122 __int16 x2;
|
|
123 __int16 y1;
|
|
124 __int16 y2;
|
|
125 __int16 z1;
|
|
126 __int16 z2;
|
|
127 };
|
|
128 #pragma pack(pop)
|
|
129
|
|
130 #pragma pack(push, 1)
|
|
131 struct BBox_int_
|
|
132 {
|
|
133 int x1;
|
|
134 int x2;
|
|
135 int y1;
|
|
136 int y2;
|
|
137 int z1;
|
|
138 int z2;
|
|
139 };
|
|
140 #pragma pack(pop)
|
|
141
|
|
142 #pragma pack(push, 1)
|
|
143 struct Plane_float_
|
|
144 {
|
|
145 struct Vec3_float_ vNormal;
|
|
146 float dist;
|
|
147 };
|
|
148 #pragma pack(pop)
|
|
149
|
|
150
|
|
151
|
|
152
|
|
153 /* 196 */
|
|
154 #pragma pack(push, 1)
|
|
155 struct Matrix3x3_float_
|
|
156 {
|
|
157 union
|
|
158 {
|
|
159 struct
|
|
160 {
|
|
161 float _11; float _12; float _13;
|
|
162 float _21; float _22; float _23;
|
|
163 float _31; float _32; float _33;
|
|
164 };
|
|
165 float v[3][3];
|
|
166 };
|
|
167 };
|
|
168 #pragma pack(pop)
|
|
169
|