//=========================================================================== // GoTools Core - SINTEF Geometry Tools Core library, version 2.0.1 // // Copyright (C) 2000-2007, 2010 SINTEF ICT, Applied Mathematics, Norway. // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation version 2 of the License. // // This program 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 General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., // 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. // // Contact information: E-mail: tor.dokken@sintef.no // SINTEF ICT, Department of Applied Mathematics, // P.O. Box 124 Blindern, // 0314 Oslo, Norway. // // Other licenses are also available for this software, notably licenses // for: // - Building commercial software. // - Building software whose source code you wish to keep private. //===========================================================================
00001 #ifndef _SPLINEUTILS_H 00002 #define _SPLINEUTILS_H 00003 00004 00005 #include "GoTools/geometry/SplineSurface.h" 00006 #include "GoTools/geometry/SplineCurve.h" 00007 #include "GoTools/utils/errormacros.h" 00008 #include <math.h> 00009 #include <algorithm> 00010 #include <ctype.h> 00011 #include "GoTools/utils/config.h" 00012 00013 00014 namespace Go { 00015 00016 00025 void GO_API transpose_array(int dim, int m, int n, double* array_start); 00026 00033 int GO_API closest_in_array(const double* pt, 00034 const double* array, 00035 int n, 00036 int dim); 00037 00044 Vector3D GO_API closest_on_triangle(const Vector3D& pt, 00045 const Vector3D tri[3], 00046 double& clo_dist2); 00047 00056 double GO_API closest_on_line_segment(const Vector3D& pt, 00057 const Vector3D& beg, 00058 const Vector3D& end); 00059 00060 00075 void GO_API closest_on_rectgrid(const double* pt, 00076 const double* array, 00077 int m, int n, 00078 double& clo_u, 00079 double& clo_v); 00080 00100 void GO_API closest_on_rectgrid(const double* pt, const double* array, 00101 int u_min, int u_max, int v_min, int v_max, 00102 int nmb_coefs_u, 00103 double& clo_u, double& clo_v); 00104 00105 00112 void GO_API make_coef_array_from_rational_coefs(const double* rationals, 00113 double* coefs, 00114 int num_coefs, 00115 int dim); 00116 00128 void GO_API curve_ratder(double const eder[],int idim,int ider,double gder[]); 00129 00152 void GO_API surface_ratder(double const eder[],int idim,int ider,double gder[]); 00153 00181 void GO_API osloalg(int ij,int imy,int ik,int in,int *jpl,int *jfi,int *jla, 00182 double *et,double *etau,double *galfa); 00183 00212 void GO_API refmatrix(double *et, int im, int ik, 00213 double *etau, int in, 00214 double *ea, int *nfirst,int *nlast); 00215 00216 } // End of namespace Go 00217 00218 00219 #endif 00220