ON_BOOL32 ON_SurfaceProxy::Transpose() { DestroySurfaceTree(); m_bTransposed = (m_bTransposed) ? false : true; return true; }
bool ON_PlaneSurface::Extend( int dir, const ON_Interval& domain ) { if ( dir < 0 || dir > 1 ) return false; bool changed = false; ON_Interval tdom = Domain(dir); ON_Interval xdom = m_extents[dir]; if (domain[0] < Domain(dir)[0]){ changed = true; tdom[0] = domain[0]; xdom[0] = m_extents[dir].ParameterAt( m_domain[dir].NormalizedParameterAt(domain[0])); } if (domain[1] > Domain(dir)[1]){ changed = true; tdom[1] = domain[1]; xdom[1] = m_extents[dir].ParameterAt( m_domain[dir].NormalizedParameterAt(domain[1])); } if (!changed) return false; DestroySurfaceTree(); m_domain[dir] = tdom; m_extents[dir] = xdom; return true; }
bool ON_NurbsSurface::Morph( const ON_SpaceMorph& morph ) { DestroySurfaceTree(); ON_BOOL32 bIsClosed[2]; ON_BOOL32 bIsPeriodic[2]; ON_BOOL32 bIsSingular[4]; int i; for ( i = 0; i < 2; i++ ) { bIsClosed[i] = IsClosed(i); bIsPeriodic[i] = IsPeriodic(i); } for ( i = 0; i < 4; i++ ) bIsSingular[i] = IsSingular(i); for ( i = 0; i < m_cv_count[0]; i++ ) { morph.MorphPointList( m_dim, m_is_rat, m_cv_count[1], m_cv_stride[1], CV(i,0) ); } for ( i = 0; i < 4; i++ ) { if ( bIsSingular[i] ) CollapseSide(i); } // TODO - if input was closed/periodic make output the same return true; }
void ON_SurfaceProxy::SetProxySurface( const ON_Surface* proxy_surface ) { // setting m_surface=0 prevents crashes if user has deleted // "real" surface before calling SetProxySurface(). m_surface = 0; DestroySurfaceTree(); if ( proxy_surface == this ) proxy_surface = 0; m_surface = proxy_surface; m_bTransposed = false; }
ON_BOOL32 ON_PlaneSurface::SetDomain( int dir, double t0, double t1 ) { bool rc = false; if ( dir >= 0 && dir <= 1 && t0 < t1 ) { rc = true; m_domain[dir].Set(t0,t1); DestroySurfaceTree(); } return rc; }
ON_Surface& ON_Surface::operator=(const ON_Surface& src) { DestroySurfaceTree(); ON_Geometry::operator=(src); return *this; }