/// <summary> /// Check that all values in other are within epsilon of the values in this /// </summary> /// <param name="other"></param> /// <param name="epsilon"></param> /// <returns></returns> public bool EpsilonEquals(NurbsSurfacePointList other, double epsilon) { if (null == other) { throw new ArgumentNullException("other"); } if (ReferenceEquals(this, other)) { return(true); } if (CountU != other.CountU) { return(false); } if (CountV != other.CountV) { return(false); } for (int u = 0; u < CountU; ++u) { for (int v = 0; v < CountV; ++v) { ControlPoint mine = GetControlPoint(u, v); ControlPoint theirs = other.GetControlPoint(u, v); if (!mine.EpsilonEquals(theirs, epsilon)) { return(false); } } } return(true); }
public NurbsSrfEnum(NurbsSurfacePointList surface_cv) { m_surface_cv = surface_cv; m_count_u = surface_cv.CountU; m_count_v = surface_cv.CountV; }