BSpline.h
Go to the documentation of this file.00001 /*============================================================================== 00002 00003 O F E L I 00004 00005 Object Finite Element Library 00006 00007 ============================================================================== 00008 00009 Copyright (C) 1998 - 2008 Rachid Touzani 00010 00011 This program is free software; you can redistribute it and/or modify it under 00012 the terms of the GNU General Public License as published by the Free 00013 Software Foundation; Version 2 of the License. 00014 00015 This program is distributed in the hope that it will be useful, but WITHOUT 00016 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 00017 FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 00018 details. 00019 00020 You should have received a copy of the GNU General Public License 00021 along with this program; if not, write to the : 00022 00023 Free Software Foundation 00024 Inc., 59 Temple Place - Suite 330 00025 Boston, MA 02111-1307, USA 00026 00027 ============================================================================== 00028 00029 Definition of function BSpline 00030 implementing the B-Spline curve algorithm 00031 00032 Copied and adapted from the program by Keith Vertanen 00033 00034 ==============================================================================*/ 00035 00036 #ifndef __BSPLINE_H 00037 #define __BSPLINE_H 00038 00039 00040 #include "OFELI_Config.h" 00041 #include "Point.h" 00042 #include "Vect.h" 00043 00044 00045 namespace OFELI { 00046 00047 void compute_intervals_(Vect<size_t> &u, size_t n, size_t t); 00048 double blend_(size_t k, size_t t, const Vect<size_t> &u, double v); 00049 void compute_point_(const Vect<size_t> &u, size_t n, size_t t, double v, 00050 const Vect<Point<double> > &control, Point<double> &output); 00051 00052 00076 void BSpline(size_t n, size_t t, Vect<Point<double> > &control, 00077 Vect<Point<double> > &output, size_t num_output); 00078 00079 } /* namespace OFELI */ 00080 00081 #endif