Пример #1
0
 public static AFTransform ByCSVector(CSVector pt)
 {
     return(new AFTransform(new double[3, 3] {
         { 1, 0, 0 }, { 0, 1, 0 }, { 0, 0, 1 }
     },
                            new double[3] {
         pt.X, pt.Y, pt.Z
     }));
 }
Пример #2
0
        public override bool Equals(object obj)
        {
            CSVector casted = obj as CSVector;

            if (null == casted)
            {
                return(false);
            }
            return(this.Equals(casted));
        }
Пример #3
0
        public static AFTransform ByRotateAroundVector(CSVector vec, double theta)
        {
            double[,] rotateTransformArray = geometryUtils.RotateThetaToMatrix(theta);

            Vector <double> mathnetV = Vector <double> .Build.DenseOfArray(new double[3] {
                vec.X, vec.Y, vec.Z
            });

            double[,] A  = geometryUtils.VectorToStardardZTransform(mathnetV);
            double[,] AI = geometryUtils.inverseArrayMatrix(A);
            return((new AFTransform(A)) * (new AFTransform(rotateTransformArray)) * (new AFTransform(AI)));
        }
Пример #4
0
 public bool Equals(CSVector cspt)
 {
     if (null == cspt)
     {
         return(false);
     }
     if (cspt.x == this.x && cspt.y == this.y && cspt.z == this.z)
     {
         return(true);
     }
     return(false);
 }