Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
enmath3d.c
Go to the documentation of this file.
1 
18 proto native vector Vector(float x, float y, float z);
19 
21 {
25 };
26 
27 class Math3D
28 {
29  private void Math3D() {}
30  private void ~Math3D() {}
31 
32  //-----------------------------------------------------------------
33  proto static vector ClipLine(vector start, vector end, vector norm, float d);
34 
43  proto static float IntersectRaySphere(vector raybase, vector raycos, vector center, float radius);
44 
53  proto static float IntersectRayBox(vector start, vector end, vector mins, vector maxs);
54 
63  proto static bool IntersectSphereBox(vector origin, float radius, vector mins, vector maxs);
64 
74  proto static bool IntersectSphereCone(vector origin, float radius, vector conepos, vector axis, float angle);
75 
85  proto static bool IntersectWholeSphereCone(vector origin, float radius, vector conepos, vector axis, float angle);
86 
97  proto static bool IntersectCylinderOBB(vector mins, vector maxs, vector obbMat[4], vector cylMat[4], float cylinderRadius, float cylinderHeight);
98 
108  proto static bool IntersectRayCylinder(vector rayStart, vector rayEnd, vector center, float radius, float height);
109 
122  proto static void YawPitchRollMatrix(vector ang, out vector mat[3]);
123 
139  proto static void DirectionAndUpMatrix(vector dir, vector up, out vector mat[4]);
140 
156  proto static void MatrixMultiply4(vector mat0[4], vector mat1[4], out vector res[4]);
157 
173  proto static void MatrixMultiply3(vector mat0[3], vector mat1[3], out vector res[3]);
174 
190  proto static void MatrixInvMultiply4(vector mat0[4], vector mat1[4], out vector res[4]);
191 
207  proto static void MatrixInvMultiply3(vector mat0[3], vector mat1[3], out vector res[3]);
208 
213  proto static void MatrixOrthogonalize4(vector mat[4]);
214 
219  proto static void MatrixOrthogonalize3(vector mat[3]);
220 
233  static void MatrixIdentity4(out vector mat[4])
234  {
235  mat[0] = "1 0 0";
236  mat[1] = "0 1 0";
237  mat[2] = "0 0 1";
238  mat[3] = vector.Zero;
239  }
240 
252  static void MatrixIdentity3(out vector mat[3])
253  {
254  mat[0] = "1 0 0";
255  mat[1] = "0 1 0";
256  mat[2] = "0 0 1";
257  }
258 
271  static void ScaleMatrix(float scale, out vector mat[3])
272  {
273  vector v0, v1, v2;
274  v0[0] = scale;
275  v1[1] = scale;
276  v2[2] = scale;
277  mat[0] = v0;
278  mat[1] = v1;
279  mat[2] = v2;
280  }
281 
293  static void QuatIdentity(out float q[4])
294  {
295  q[0] = 0;
296  q[1] = 0;
297  q[2] = 0;
298  q[3] = 1;
299  }
300 
314  static void QuatCopy(float s[4], out float d[4])
315  {
316  d[0] = s[0];
317  d[1] = s[1];
318  d[2] = s[2];
319  d[3] = s[3];
320  }
321 
337  proto static void MatrixToQuat(vector mat[3], out float d[4]);
338 
339 
341  proto static void QuatToMatrix(float q[4], out vector mat[3]);
342 
356  proto static vector MatrixToAngles(vector mat[3]);
357 
374  proto static void QuatLerp(out float qout[4], float q1[4], float q2[4], float frac);
375 
391  proto static void QuatMultiply(out float qout[4], float q1[4], float q2[4]);
392 
394  proto static vector QuatToAngles(float q[4]);
395 
413  proto static int CheckBoundBox(vector mins1, vector maxs1, vector mins2, vector maxs2);
414 
424  static vector GetRandomDir()
425  {
426  float x = Math.RandomFloatInclusive(-1, 1);
427  float y = Math.RandomFloatInclusive(-1, 1);
428  float z = Math.RandomFloatInclusive(-1, 1);
429 
430  return Vector(x, y, z).Normalized();
431  }
432 
433 
448  proto static native vector Curve(ECurveType type, float param, notnull array<vector> points);
449 
450 
455  proto static vector NearestPoint(vector beg, vector end, vector pos);
456 
461  proto static float AngleFromPosition(vector origin, vector originDir, vector target);
462 
472  proto static void ConePoints(vector origin, float length, float halfAngle, float angleOffset, out vector leftPoint, out vector rightPoint);
473 };
474 //@}
ECurveType
ECurveType
Definition: enmath3d.c:20
y
Icon y
CatmullRom
@ CatmullRom
Definition: enmath3d.c:22
vector
Definition: enconvert.c:105
NaturalCubic
@ NaturalCubic
Definition: enmath3d.c:23
array< vector >
x
Icon x
Math
Definition: enmath.c:6
Vector
proto native vector Vector(float x, float y, float z)
Vector constructor from components.
UniformCubic
@ UniformCubic
Definition: enmath3d.c:24
Math3D
Definition: enmath3d.c:27
points
< h scale="0.8">< image set="dayz_gui" name="icon_pin"/> Welcome to the DayZ Stress Test Branch</h >< h scale="0.6"> This branch serves for time limited development tests that are open to the community Our goal in each of these tests is to gather performance and stability data from servers under heavy load</h ></br >< h scale="0.8">< image set="dayz_gui" name="icon_pin"/> Stress test Schedule</h >< h scale="0.6"> We ll only run the Stress Tests when our development team needs data and or specific feedback Stress Tests will be announced on our Twitter and and will usually run for a couple of hours</h ></br >< h scale="0.8">< image set="dayz_gui" name="icon_pin"/> Current Stress Test</h >< h scale="0.6"> In the first bunch of Stress we ll mostly focus on watching server performance under heavy PvP gameplay load For detailed information about an ongoing Stress please visit dayz com dev hub</h ></br >< h scale="0.8">< image set="dayz_gui" name="icon_pin"/> Important Note</h >< h scale="0.6"> Stress Tests do not represent a typical DayZ gameplay experience Spawn points
Definition: news_feed.txt:26