ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/REPOS_ERICCA/magic/lib/step/src/stbspline.h
Revision: 27
Committed: Thu Jul 5 15:26:40 2007 UTC (17 years, 10 months ago) by foucault
Content type: text/plain
Original Path: magic/lib/step/step/src/stbspline.h
File size: 3297 byte(s)
Log Message:

File Contents

# User Rev Content
1 foucault 27 //------------------------------------------------------------
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    
68     virtual void get_valeur_fonction(int inter, double t, int degre, std::vector<double> &knots, double *grand_n);
69     virtual void deriver_bs_kieme(int nb_point,int degre,std::vector<double> &knots,std::vector<OT_VECTEUR_4D> &ptsctr_x,double t,int d, OT_VECTEUR_4D * CK);
70     virtual void deriver_kieme(double t,int d,double *CK_x,double *CK_y,double *CK_z);
71     virtual void binomialCoef(double * Bin, int degre);
72     virtual void deriver_fonction(int inter,double t,int degre,int dd,std::vector<double> &knots,double *f_deriver);
73     virtual void get_param_NURBS(int& indx_premier_ptctr,TPL_LISTE_ENTITE<double> &param);
74    
75     int periodique;
76     double periode;
77     int degre;
78     int nb_point;
79     std::vector<int> indexptsctr;
80     std::vector<double> knots;
81     std::vector<OT_VECTEUR_4D> ptsctr;
82     };
83    
84    
85     #endif