◆ Multiply() [1/2]
static Vector3 BrawlLib.Internal.Matrix4d.Multiply |
( |
double[] |
matrix, |
|
|
Vector3 |
vector |
|
) |
| |
|
inlinestatic |
11 {
12 Vector3 nv = new Vector3
13 {
14 _x = (float) (matrix[0] * vector._x + matrix[4] * vector._y + matrix[8] * vector._z + matrix[12]),
15 _y = (float) (matrix[1] * vector._x + matrix[5] * vector._y + matrix[9] * vector._z + matrix[13]),
16 _z = (float) (matrix[2] * vector._x + matrix[6] * vector._y + matrix[10] * vector._z + matrix[14])
17 };
18
19 return nv;
20 }
◆ Multiply() [2/2]
23 {
24 double* s1 = mLeft->_data, s2 = mRight->_data;
25 double* dPtr = mOut->_data;
26 int index = 0;
27 double val;
28
29 for (int b = 0; b < 16; b += 4)
30 {
31 for (int a = 0; a < 4; a++)
32 {
33 val = 0.0;
34 for (int x = b, y = a; y < 16; y += 4)
35 {
36 val += s1[x++] * s2[y];
37 }
38
39 dPtr[index++] = val;
40 }
41 }
42 }
◆ _data
fixed double BrawlLib.Internal.Matrix4d._data[16] |
The documentation for this struct was generated from the following file:
- BrawlLib/Internal/Matrix4d.cs