コード例 #1
0
    public static Matrix3x3 operator *(Matrix3x3 S1, Matrix3x3 S2)
    {
        Vector3 _r1 = new Vector3(Vector3.Dot(S1.GetRow(0), S2.GetColumn(0)), Vector3.Dot(S1.GetRow(0), S2.GetColumn(1)), Vector3.Dot(S1.GetRow(0), S2.GetColumn(2)));
        Vector3 _r2 = new Vector3(Vector3.Dot(S1.GetRow(1), S2.GetColumn(0)), Vector3.Dot(S1.GetRow(1), S2.GetColumn(1)), Vector3.Dot(S1.GetRow(1), S2.GetColumn(2)));
        Vector3 _r3 = new Vector3(Vector3.Dot(S1.GetRow(2), S2.GetColumn(0)), Vector3.Dot(S1.GetRow(2), S2.GetColumn(1)), Vector3.Dot(S1.GetRow(2), S2.GetColumn(2)));

        return(new Matrix3x3(_r1, _r2, _r3));
    }
コード例 #2
0
 public static Vector3 operator *(Matrix3x3 S1, Vector3 S2)
 {
     return(new Vector3(Vector3.Dot(S1.GetRow(0), S2), Vector3.Dot(S1.GetRow(1), S2), Vector3.Dot(S1.GetRow(2), S2)));
 }