ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/REPOS_ERICCA/magic/lib/geometrie/src/lc_point.cpp
Revision: 253
Committed: Tue Jul 13 19:40:46 2010 UTC (14 years, 10 months ago) by francois
File size: 2530 byte(s)
Log Message:
changement de hiearchie et utilisation de ccmake + mise a jour

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