示例#1
0
        public static Matrix3d RotationArbitraryAxis(Vector3d axis, double radian)
        {
            Vector3d vector3d   = axis.Normalize();
            double   num        = Math.Cos(radian);
            double   double_    = Math.Sin(radian);
            Matrix3d matrix3d_  = new Matrix3d(num);
            Matrix3d matrix3d_2 = Matrix3d.smethod_2(Vector3d.TensorProduct(vector3d, vector3d), 1.0 - num);
            Matrix3d matrix3d_3 = Matrix3d.smethod_2(Matrix3d.CrossProductMatrix3d(vector3d), double_);

            return(Matrix3d.smethod_0(Matrix3d.smethod_0(matrix3d_, matrix3d_2), matrix3d_3));
        }
示例#2
0
 public static Matrix3d operator +(Matrix3d A, Matrix3d B)
 {
     return(Matrix3d.smethod_0(A, B));
 }