ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/REPOS_ERICCA/magic/lib/step/src/stbspline.h
Revision: 5
Committed: Tue Jun 12 20:26:34 2007 UTC (17 years, 11 months ago)
Content type: text/plain
Original Path: magic/lib/step/step/src/stbspline.h
File size: 3630 byte(s)
Log Message:

File Contents

# User Rev Content
1 5 //------------------------------------------------------------
2     //------------------------------------------------------------
3     // MAGiC
4     // Jean Christophe Cuillière et Vincent FRANCOIS
5     // Département de Génie Mécanique - UQTR
6     //------------------------------------------------------------
7     // Le projet MAGIC est un projet de recherche du département
8     // de génie mécanique de l'Université du Québec à
9     // Trois Rivières
10     // Les librairies ne peuvent être utilisées sans l'accord
11     // des auteurs (contact : francois@uqtr.ca)
12     //------------------------------------------------------------
13     //------------------------------------------------------------
14     //
15     // stbspline.h
16     //
17     //------------------------------------------------------------
18     //------------------------------------------------------------
19     // COPYRIGHT 2000
20     // Version du 02/03/2006 à 11H24
21     //------------------------------------------------------------
22     //------------------------------------------------------------
23     #ifndef _HEADER_STBSPLINE_
24     #define _HEADER_STBSPLINE_
25    
26     #ifdef WINDOWS_VERSION
27     #ifdef BUILT_DLL_STEPLIB
28     #define DLLPORTSTEP __declspec(dllexport)
29     #else
30     #define DLLPORTSTEP __declspec(dllimport)
31     #endif
32     #else
33     #define DLLPORTSTEP
34     #endif
35    
36    
37     #include "st_courbe.h"
38     #include "st_point.h"
39     #include <vector>
40     #include "ot_mathematique.h"
41    
42    
43    
44     class DLLPORTSTEP ST_B_SPLINE : public ST_COURBE
45     {
46     public :
47     ST_B_SPLINE(long LigneCourante,std::string idori,int bs_degre,std::vector<int> bs_indexptsctr,std::vector<int> bs_knots_multiplicities,std::vector<double> bs_knots);
48     ST_B_SPLINE(int bs_degre,std::vector<double> &vec_knots,std::vector<double> &vec_point,std::vector<double> &vec_poids);
49     ~ST_B_SPLINE();
50     virtual void evaluer(double t,double *xyz) ;
51     virtual void deriver(double t,double *xyz) ;
52     virtual void deriver_seconde(double t,double *ddxyz,double* dxyz = NULL,double* xyz = NULL);
53     virtual void inverser(double& t,double *xyz,double precision=1e-6) ;
54     virtual int inverser2(double& t,double *xyz,int num_test,double precision=1e-6) ;
55     virtual double get_tmin();
56     virtual double get_tmax();
57     virtual double get_longueur(double t1,double t2,double precis=1e6);
58     virtual int est_periodique(void);
59     virtual double get_periode(void);
60     virtual void initialiser(class ST_GESTIONNAIRE* gest);
61     virtual int get_type_geometrique(TPL_LISTE_ENTITE<double> &param);
62     virtual void est_util(class ST_GESTIONNAIRE* gest);
63    
64    
65     private:
66     virtual int get_intervalle(int nbptsctr, int degre, double t, std::vector<double> &knots);
67     virtual void get_valeur_fonction(int inter, double t, int degre, std::vector<double> &knots, double *grand_n);
68     virtual void deriver_pts(int nbptsctr,int degre,std::vector<double> &knots,std::vector<double> &ptsctr_x,int d,int r1,int r2,double *PK_x);
69     virtual void deriver_bs_kieme(int nbptsctr,int degre,std::vector<double> &knots,std::vector<double> &ptsctr_x,double t,int d,double *CK);
70     virtual void deriver_kieme(double t,int d,double *CK_x,double *CK_y,double *CK_z);
71     virtual void get_tout_fonction(int inter, double t, int degre, std::vector<double> &knots, double *grand_n);
72     virtual void binomialCoef(double * Bin, int degre);
73     //virtual void ST_B_SPLINE::deriver_fonction(int inter,double t,int degre,int nb_point,vector<double> &knots,double *f_deriver);
74     virtual void get_param_NURBS(TPL_LISTE_ENTITE<double> &param);
75    
76    
77     int periodique;
78     double periode;
79     int degre;
80     int nb_point;
81     std::vector<int> indexptsctr;
82     std::vector<double> knots;
83     std::vector<double> poids;
84     std::vector<double> ptsctr;
85     };
86    
87    
88     #endif