ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/REPOS_ERICCA/magic/lib/step/src/st_point.cpp
Revision: 283
Committed: Tue Sep 13 21:11:20 2011 UTC (13 years, 8 months ago) by francois
File size: 2547 byte(s)
Log Message:
structure de l'écriture

File Contents

# User Rev Content
1 francois 283 //------------------------------------------------------------
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     // st_point.cpp
16     //
17     //------------------------------------------------------------
18     //------------------------------------------------------------
19     // COPYRIGHT 2000
20     // Version du 02/03/2006 � 11H24
21     //------------------------------------------------------------
22     //------------------------------------------------------------
23    
24    
25     #include "gestionversion.h"
26    
27     #include "st_point.h"
28     #include "constantegeo.h"
29    
30    
31     ST_POINT::ST_POINT(long num,std::string idori,double x,double y, double z):ST_IDENTIFICATEUR(num,idori)
32     {
33     coord[0]=x;
34     coord[1]=y;
35     coord[2]=z;
36     }
37    
38    
39    
40     ST_POINT::ST_POINT(ST_POINT& mdd):ST_IDENTIFICATEUR(mdd.get_id(),mdd.get_idoriginal())
41     {
42     coord[0]=mdd.coord[0];
43     coord[1]=mdd.coord[1];
44     coord[2]=mdd.coord[2];
45     }
46    
47     ST_POINT::~ST_POINT()
48     {
49     }
50    
51    
52     void ST_POINT::evaluer(double *xyz)
53     {
54     xyz[0]=coord[0];
55     xyz[1]=coord[1];
56     xyz[2]=coord[2];
57     }
58    
59    
60     int ST_POINT::get_type_geometrique(TPL_LISTE_ENTITE<double> &param)
61     {
62     param.ajouter(coord[0]);
63     param.ajouter(coord[1]);
64     param.ajouter(coord[2]);
65     return MGCo_POINT;
66     }
67    
68     void ST_POINT:: get_param_NURBS(int& indx_premier_ptctr,TPL_LISTE_ENTITE<double> &param)
69     {
70     // the first parameter indicates the acces code
71     param.ajouter(0);
72     // the second parameter indicates the order of the point which should be one for a point
73     param.ajouter(1);
74     param.ajouter(0);
75    
76     param.ajouter(1);
77     param.ajouter(0);
78    
79     // the third parameter presente the number of the controls point wich correspond to the cordinate point
80     // note that the cordinate of the control points are given in homogeneous cordinates
81     // for a point, the weight it's �qual to one.
82    
83     param.ajouter(coord[0]);
84     param.ajouter(coord[1]);
85     param.ajouter(coord[2]);
86    
87     param.ajouter(1.);
88    
89     indx_premier_ptctr =5;
90     }
91    
92    
93    
94    
95     //---------------------------------------------------------------------------
96