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

tri_spline.h

00001 /*===================================================================== 00002 File: nurbs.cpp 00003 Purpose: 00004 Revision: $Id: tri_spline.h,v 1.2 2002/05/13 21:07:46 philosophil Exp $ 00005 Author: 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 _TRIANGULAR_BSPLINE_H 00026 #define _TRIANGULAR_BSPLINE_H 00027 00028 #include "nurbs_global.h" 00029 00030 #include "point_nd.h" 00031 #include "hpoint_nd.h" 00032 #include "barray.h" 00033 00034 #include "nurbsS.h" 00035 00038 namespace PLib { 00039 00040 template <class T, int D> 00041 class TriangularBSpline { 00042 private: 00043 BasicArray<Point_nD<T,D> > cp; 00044 int deg ; 00045 public: 00046 TriangularBSpline(int degree); 00047 Point_nD<T,D>& b(int i, int j, int); 00048 Point_nD<T,D> b(int, int ,int) const ; 00049 Point_nD<T,D> operator()(T u, T v) const; 00050 00051 }; 00052 00053 template <class T, int D> 00054 class RTriangularBSpline { 00055 private: 00056 BasicArray<HPoint_nD<T,D> > cp; 00057 int deg ; 00058 public: 00059 RTriangularBSpline(int degree); 00060 HPoint_nD<T,D>& b(int, int, int); 00061 HPoint_nD<T,D> b(int, int ,int) const ; 00062 HPoint_nD<T,D> operator()(T u, T v) const; 00063 00064 int writeVRML(const char* filename, const Color& color=whiteColor, int Nu=20, int Nv=20, int Nw=20) const; 00065 int writeVRML(ostream& fout, const Color& color=whiteColor, int Nu=20, int Nv=20, int Nw=20) const; 00066 00067 void setDegree(int d) ; 00068 }; 00069 00070 template < class T, int D> void convert(const NurbsSurface<T,D>& surf, RTriangularBSpline<T,D> &t1, RTriangularBSpline<T,D> &t2) ; 00071 00072 } 00073 00074 00075 #endif

Generated on Tue Jul 27 15:44:57 2004 for NURBS++ by doxygen 1.3.7