Main Page | Class Hierarchy | Class List | File List | Class Members

curve.h

00001 /*============================================================================= 00002 File: curve.h 00003 Purpose: 00004 Revision: $Id: curve.h,v 1.2 2002/05/13 21:07:45 philosophil Exp $ 00005 Created by: Philippe Lavoie (3 Oct, 1996) 00006 Modified by: 00007 00008 Copyright notice: 00009 Copyright (C) 1996-1997 Philippe Lavoie 00010 00011 This library is free software; you can redistribute it and/or 00012 modify it under the terms of the GNU Library General Public 00013 License as published by the Free Software Foundation; either 00014 version 2 of the License, or (at your option) any later version. 00015 00016 This library is distributed in the hope that it will be useful, 00017 but WITHOUT ANY WARRANTY; without even the implied warranty of 00018 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00019 Library General Public License for more details. 00020 00021 You should have received a copy of the GNU Library General Public 00022 License along with this library; if not, write to the Free 00023 Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 00024 =============================================================================*/ 00025 #ifndef _nurbs_curve_h_ 00026 #define _nurbs_curve_h_ 00027 00028 #include "nurbs_global.h" 00029 00030 #include "vector.h" 00031 00034 namespace PLib { 00035 template <class T, int N> class ParaCurve ; 00036 00044 template <class T, int N> 00045 class ParaCurve{ 00046 public: 00047 ParaCurve() 00048 {;} 00049 00050 virtual HPoint_nD<T,N> operator()(T u) const =0; 00051 00052 HPoint_nD<T,N> hpointAt(T u) const { return operator()(u); } 00053 00055 Point_nD<T,N> pointAt(T u) const { return project(operator()(u)) ; } 00056 00057 virtual HPoint_nD<T,N> hpointAt(T u, int span) const =0 ; 00058 00060 Point_nD<T,N> pointAt(T u, int span) { return project(hpointAt(u,span)) ; } 00061 00062 virtual void deriveAtH(T u, int, Vector< HPoint_nD<T,N> >&) const =0; 00063 virtual void deriveAt(T u, int, Vector< Point_nD<T,N> >&) const =0; 00064 00065 virtual T minKnot() const = 0 ; 00066 virtual T maxKnot() const = 0 ; 00067 00068 virtual T minDist2(const Point_nD<T,N>& p, T& guess,T error=0.0001,T s=0.2,int sep=9,int maxIter=10,T um=-1, T uM=-1) const ; 00069 virtual Point_nD<T,N> minDistY(T y, T& guessU, T error=0.0001, T s=-1, int sep=9, int maxIter=10, T um=-1, T uM=-1) const ; 00070 virtual Point_nD<T,N> minDistX(T y, T& guessU, T error=0.0001, T s=-1, int sep=9, int maxIter=10, T um=-1, T uM=-1) const ; 00071 virtual Point_nD<T,N> minDistZ(T y, T& guessU, T error=0.0001, T s=-1, int sep=9, int maxIter=10, T um=-1, T uM=-1) const ; 00072 00073 virtual T extremum(int findMin, CoordinateType coord, T minDu=0.0001, int sep=9, int maxIter=10, T um=-1, T uM=-1) const ; 00074 00075 }; 00076 00077 template <class T, int N> 00078 inline void CderH(T u,const ParaCurve<T,N>& c,int d, Vector< HPoint_nD<T,N> >& ders) { c.deriveAtH(u,d,ders);} 00079 00080 template <class T, int N> 00081 inline void Cder(T u,const ParaCurve<T,N>& c,int d, Vector< Point_nD<T,N> >& ders) { c.deriveAt(u,d,ders);} 00082 00083 } // end namespace 00084 00085 00086 #ifdef INCLUDE_TEMPLATE_SOURCE 00087 #include "curve.cpp" 00088 #endif 00089 00090 #endif 00091

Generated on Sat May 15 00:00:00 2004 for NURBS++ by doxygen 1.3.7