Exemplo n.º 1
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = ControlPointList.Cast <Vector4>().GetHashCode(v => v.GetHashCode());
         hashCode = (hashCode * 397) ^ KnotsU.GetHashCode(v => v.GetHashCode());
         hashCode = (hashCode * 397) ^ KnotsV.GetHashCode(v => v.GetHashCode());
         hashCode = (hashCode * 397) ^ OrderU;
         hashCode = (hashCode * 397) ^ OrderV;
         return(hashCode);
     }
 }
Exemplo n.º 2
0
        public bool Equals(BSplineSurface other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }
            return(ControlPointList.Cast <Vector4>().SequenceEqual(other.ControlPointList.Cast <Vector4>()) &&
                   KnotsU.SequenceEqual(other.KnotsU) &&
                   KnotsV.SequenceEqual(other.KnotsV)

                   && OrderU == other.OrderU &&
                   OrderV == other.OrderV);
        }