示例#1
0
        public bool Equals(NurbsBase?other)
        {
            if (other == null)
            {
                return(false);
            }

            if (!ControlPointLocations.SequenceEqual(other.ControlPointLocations))
            {
                return(false);
            }

            if (!Knots.SequenceEqual(other.Knots))
            {
                return(false);
            }

            if (Degree != other.Degree)
            {
                return(false);
            }

            return(Weights.SequenceEqual(other.Weights));
        }
示例#2
0
        /// <summary>
        /// Applies a transformation to all the points.
        /// </summary>
        /// <param name="transform">Transformation matrix to apply.</param>
        /// <returns>A polygon transformed.</returns>
        public new Polygon Transform(Transform transform)
        {
            List <Point3> transformedPts = ControlPointLocations.Select(pt => pt.Transform(transform)).ToList();

            return(new Polygon(transformedPts));
        }