00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033 #ifndef _GOSPLINEUTILS_H
00034 #define _GOSPLINEUTILS_H
00035
00036
00037 #include "SplineSurface.h"
00038 #include "SplineCurve.h"
00039 #include "errormacros.h"
00040 #include <math.h>
00041 #include <algorithm>
00042 #include <ctype.h>
00043
00044
00045 namespace Go {
00048
00049
00050
00059 void transpose_array(int dim, int m, int n, double* array_start);
00060
00067 int closest_in_array(const double* pt,
00068 const double* array,
00069 int n,
00070 int dim);
00071
00078 Vector3D closest_on_triangle(const Vector3D& pt,
00079 const Vector3D tri[3],
00080 double& clo_dist2);
00081
00090 double closest_on_line_segment(const Vector3D& pt,
00091 const Vector3D& beg,
00092 const Vector3D& end);
00093
00094
00109 void closest_on_rectgrid(const double* pt,
00110 const double* array,
00111 int m, int n,
00112 double& clo_u,
00113 double& clo_v);
00114
00134 void closest_on_rectgrid(const double* pt, const double* array,
00135 int u_min, int u_max, int v_min, int v_max,
00136 int nmb_coefs_u,
00137 double& clo_u, double& clo_v);
00138
00139
00146 void make_coef_array_from_rational_coefs(const double* rationals,
00147 double* coefs,
00148 int num_coefs,
00149 int dim);
00150
00162 void curve_ratder(double const eder[],int idim,int ider,double gder[]);
00163
00186 void surface_ratder(double const eder[],int idim,int ider,double gder[]);
00187
00215 void osloalg(int ij,int imy,int ik,int in,int *jpl,int *jfi,int *jla,
00216 double *et,double *etau,double *galfa);
00217
00246 void refmatrix(double *et, int im, int ik,
00247 double *etau, int in,
00248 double *ea, int *nfirst,int *nlast);
00249
00251 }
00252
00253
00254 #endif
00255
00256