1 // SPLINE.H : a "B-spline" class for ribbon models. 2 3 // Copyright (C) 1998 Tommi Hassinen. 4 5 // This package is free software; you can redistribute it and/or modify 6 // it under the terms of the GNU General Public License as published by 7 // the Free Software Foundation; either version 2 of the License, or 8 // (at your option) any later version. 9 10 // This package is distributed in the hope that it will be useful, 11 // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 // GNU General Public License for more details. 14 15 // You should have received a copy of the GNU General Public License 16 // along with this package; if not, write to the Free Software 17 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 18 19 /*################################################################################################*/ 20 21 #ifndef SPLINE_H 22 #define SPLINE_H 23 24 //#include "ghemicalconfig2.h" 25 26 class spline; 27 28 /*################################################################################################*/ 29 30 #include <ghemical/typedef.h> 31 32 /*################################################################################################*/ 33 34 /// This is a "##B-spline" class for those ribbon models... 35 36 class spline 37 { 38 private: 39 40 i32s order; 41 i32s ncp; i32s nk; 42 43 fGL * knot; 44 fGL * weight; 45 fGL ** cpcrd; // no data, just the pointers... 46 47 public: 48 49 spline(i32s p1, i32s p2); 50 ~spline(void); 51 52 void Compute(fGL, fGL *); 53 SetPoint(i32s p1,fGL * p2)54 void SetPoint(i32s p1, fGL * p2) { cpcrd[p1] = p2; } SetKnot(i32s p1,fGL p2)55 void SetKnot(i32s p1, fGL p2) { knot[p1] = p2; } 56 GetOrder(void)57 i32s GetOrder(void) { return order; } 58 }; 59 60 /*################################################################################################*/ 61 62 #endif // SPLINE_H 63 64 // eof 65