public mat4(mat3 R, vec3 t) :base(4) { CopyFrom(R); this[0, 3] = t.x; this[1, 3] = t.y; this[2, 3] = t.z; this[3, 3] = 1; }
public static mat3 outerProduct(vec3 c, vec3 r) { mat3 a = new mat3(); a[0, 0] = c.x * r.x; a[1, 0] = c.x * r.y; a[2, 0] = c.x * r.z; a[0, 1] = c.y * r.x; a[1, 1] = c.y * r.y; a[2, 1] = c.y * r.z; a[0, 2] = c.z * r.x; a[1, 2] = c.z * r.y; a[2, 2] = c.z * r.z; return a; }
public static mat3 transpose(mat3 m) { return (mat3)m.Transpose; }
public static mat3 inverse(mat3 m) { double[,] i = m.GetInverse(); mat3 r = new mat3(i); return r; }
public static mat3 matrixCompMult(mat3 x, mat3 y) { mat3 r = new mat3(MatrixSquare.ComponentMultiply(x, y)); return r; }