Esempio n. 1
0
        public static Matrix3D GetArbitraryCoordSystem(Vector3D zaxis)
        {
            Vector3D xaxis;

            if (System.Math.Abs(zaxis.X) > System.Math.Abs(zaxis.Y))
            {
                double num = 1.0 / System.Math.Sqrt(zaxis.X * zaxis.X + zaxis.Z * zaxis.Z);
                xaxis = new Vector3D(-zaxis.Z * num, 0.0, zaxis.X * num);
            }
            else
            {
                double num = 1.0 / System.Math.Sqrt(zaxis.Y * zaxis.Y + zaxis.Z * zaxis.Z);
                xaxis = new Vector3D(0.0, zaxis.Z * num, -zaxis.Y * num);
            }
            return(Transformation3D.smethod_0(xaxis, zaxis));
        }