29 using System.Collections.Generic;
30 using System.Diagnostics;
32 namespace OpenSim.
Region.PhysicsModules.ConvexDecompositionDotNet
44 public float3x3(
float xx,
float xy,
float xz,
float yx,
float yy,
float yz,
float zx,
float zy,
float zz)
46 x =
new float3(xx, xy, xz);
47 y =
new float3(yx, yy, yz);
48 z =
new float3(zx, zy, zz);
68 throw new ArgumentOutOfRangeException();
72 public float this[
int i,
int j]
103 throw new ArgumentOutOfRangeException();
112 case 0: x.x = value;
return;
113 case 1: x.y = value;
return;
114 case 2: x.z = value;
return;
120 case 0: y.x = value;
return;
121 case 1: y.y = value;
return;
122 case 2: y.z = value;
return;
128 case 0: z.x = value;
return;
129 case 1: z.y = value;
return;
130 case 2: z.z = value;
return;
134 throw new ArgumentOutOfRangeException();
171 return m.x.x * m.y.y * m.z.z + m.y.x * m.z.y * m.x.z + m.z.x * m.x.y * m.y.z - m.x.x * m.z.y * m.y.z - m.y.x * m.x.y * m.z.z - m.z.x * m.y.y * m.x.z;
177 float d = Determinant(a);
178 Debug.Assert(d != 0);
179 for (
int i = 0; i < 3; i++)
181 for (
int j = 0; j < 3; j++)
183 int i1 = (i + 1) % 3;
184 int i2 = (i + 2) % 3;
185 int j1 = (j + 1) % 3;
186 int j2 = (j + 2) % 3;
189 b[i, j] = (a[i1][j1] * a[i2][j2] - a[i1][j2] * a[i2][j1]) / d;
static float3x3 Inverse(float3x3 a)
float3x3(float3 _x, float3 _y, float3 _z)
float3x3(float xx, float xy, float xz, float yx, float yy, float yz, float zx, float zy, float zz)
static float3x3 Transpose(float3x3 m)
static float Determinant(float3x3 m)