ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/REPOS_ERICCA/magic/lib/geometrie/src/lc_point.cpp
Revision: 283
Committed: Tue Sep 13 21:11:20 2011 UTC (13 years, 8 months ago) by francois
File size: 2529 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     // 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     void LC_POINT::get_param_NURBS(int& indx_premier_ptctr,TPL_LISTE_ENTITE<double> &param)
75     {
76    
77     // 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     param.ajouter(x);
91     param.ajouter(y);
92     param.ajouter(z);
93    
94     param.ajouter(1);
95    
96     indx_premier_ptctr=5;
97    
98     }
99    
100