Example #1
0
        public static PPoint3D operator /(PPoint3D a, ITransformation3D b)
        {
            var allPoints = new List <PPoint3D> {
                a
            };
            INvertibleTransformation3D transformation3D = b as INvertibleTransformation3D;

            if (transformation3D == null)
            {
                throw new InvalidCastException("Transformation not invertible!");
            }
            transformation3D.Invert(ref a, allPoints);
            return(a);
        }
Example #2
0
        public static Plot3D operator /(Plot3D a, ITransformation3D b)
        {
            var l = a._points.ConvertAll(el => new PPoint3D(el.X, el.Y, el.Z, el.Color, el.Visible));

            Parallel.For(0, a._points.Count, i =>
            {
                PPoint3D point = a._points[i];
                INvertibleTransformation3D transformation3D = b as INvertibleTransformation3D;
                if (transformation3D == null)
                {
                    throw new InvalidCastException("Transformation not invertible!");
                }
                transformation3D.Invert(ref point, l);
                a._points[i] = point;
            });
            return(a);
        }