/*===================================================================== File: nurbs_sp.cpp Purpose: Revision: $Id: nurbs_sp.cpp,v 1.2 2002/05/13 21:07:46 philosophil Exp $ Created by: Philippe Lavoie (7 May, 1998) Modified by: Copyright notice: Copyright (C) 1996-1997 Philippe Lavoie This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. =====================================================================*/ #include /*! */ namespace PLib { /*! \brief Updates the basis value Updates the basis value at which a control point has maximal influence. It also finds where the control point has maximal influence. \warning The degree of the curve must be of 3 or less. \author Philippe Lavoie \date 7 May, 1998 */ template void NurbsCurveSP::updateMaxU() { if(this->deg_>3){ #ifdef USE_EXCEPTION throw NurbsInputError(); #else Error error("NurbsCurveSP") ; error << "This class can't handle a curve of degree 4 or higher.\n" ; error.fatal() ; #endif } else{ maxU.resize(this->P.n()) ; maxAt_.resize(this->P.n()) ; for(int i=0;iP.n();++i){ if(!maxInfluence(i,this->U,this->deg_,maxAt_[i])) cerr << "Problem in maxInfluence U!\n" ; if(i>0) if(maxAt_[i]