1 |
//------------------------------------------------------------ |
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 |
// opt_triangle.cpp |
16 |
// |
17 |
//------------------------------------------------------------ |
18 |
//------------------------------------------------------------ |
19 |
// COPYRIGHT 2000 |
20 |
// Version du 02/03/2006 � 11H22 |
21 |
//------------------------------------------------------------ |
22 |
//------------------------------------------------------------ |
23 |
|
24 |
|
25 |
#include "gestionversion.h" |
26 |
#include "mg_maillage.h" |
27 |
#include "ot_decalage_parametre.h" |
28 |
#include "opt_triangle.h" |
29 |
|
30 |
|
31 |
|
32 |
OPT_TRIANGLE::OPT_TRIANGLE(MG_TRIANGLE* tri):triangle(tri) |
33 |
{ |
34 |
|
35 |
} |
36 |
|
37 |
OPT_TRIANGLE::OPT_TRIANGLE(OPT_TRIANGLE& mdd):triangle(mdd.triangle) |
38 |
{ |
39 |
|
40 |
} |
41 |
|
42 |
OPT_TRIANGLE::~OPT_TRIANGLE() |
43 |
{ |
44 |
|
45 |
} |
46 |
|
47 |
|
48 |
|
49 |
unsigned long OPT_TRIANGLE::get_id(void) |
50 |
{ |
51 |
return triangle->get_id(); |
52 |
} |
53 |
|
54 |
MG_ELEMENT_TOPOLOGIQUE* OPT_TRIANGLE::get_lien_topologie(void) |
55 |
{ |
56 |
return triangle->get_lien_topologie(); |
57 |
} |
58 |
|
59 |
void OPT_TRIANGLE::change_normale_unitaire(OT_VECTEUR_3D vec) |
60 |
{ |
61 |
normale_unitaire=vec; |
62 |
} |
63 |
|
64 |
double OPT_TRIANGLE::change_angle1_initial(double angle) |
65 |
{ |
66 |
a1_init=angle; |
67 |
} |
68 |
|
69 |
double OPT_TRIANGLE::change_angle2_initial(double angle) |
70 |
{ |
71 |
a2_init=angle; |
72 |
} |
73 |
|
74 |
double OPT_TRIANGLE::change_angle3_initial(double angle) |
75 |
{ |
76 |
a3_init=angle; |
77 |
} |
78 |
|
79 |
double OPT_TRIANGLE::change_angle1(double angle) |
80 |
{ |
81 |
a1=angle; |
82 |
} |
83 |
|
84 |
double OPT_TRIANGLE::change_angle2(double angle) |
85 |
{ |
86 |
a2=angle; |
87 |
} |
88 |
|
89 |
double OPT_TRIANGLE::change_angle3(double angle) |
90 |
{ |
91 |
a3=angle; |
92 |
} |
93 |
|
94 |
OT_VECTEUR_3D OPT_TRIANGLE::get_normale_unitaire(void) |
95 |
{ |
96 |
return normale_unitaire; |
97 |
} |
98 |
|
99 |
double OPT_TRIANGLE::get_angle1_initial(void ) |
100 |
{ |
101 |
return a1_init; |
102 |
} |
103 |
|
104 |
double OPT_TRIANGLE::get_angle2_initial(void ) |
105 |
{ |
106 |
return a2_init; |
107 |
} |
108 |
|
109 |
double OPT_TRIANGLE::get_angle3_initial(void ) |
110 |
{ |
111 |
return a3_init; |
112 |
} |
113 |
|
114 |
double OPT_TRIANGLE::get_angle1(void) |
115 |
{ |
116 |
return a1; |
117 |
} |
118 |
|
119 |
double OPT_TRIANGLE::get_angle2(void) |
120 |
{ |
121 |
return a2; |
122 |
} |
123 |
|
124 |
double OPT_TRIANGLE::get_angle3(void) |
125 |
{ |
126 |
return a3; |
127 |
} |
128 |
|
129 |
|
130 |
|
131 |
MG_NOEUD* OPT_TRIANGLE::get_noeud1(void) |
132 |
{ |
133 |
return triangle->get_noeud1(); |
134 |
} |
135 |
|
136 |
MG_NOEUD* OPT_TRIANGLE::get_noeud2(void) |
137 |
{ |
138 |
return triangle->get_noeud2(); |
139 |
} |
140 |
|
141 |
MG_NOEUD* OPT_TRIANGLE::get_noeud3(void) |
142 |
{ |
143 |
return triangle->get_noeud3(); |
144 |
} |
145 |
|
146 |
MG_SEGMENT* OPT_TRIANGLE::get_segment1(void) |
147 |
{ |
148 |
return triangle->get_segment1(); |
149 |
} |
150 |
|
151 |
MG_SEGMENT* OPT_TRIANGLE::get_segment2(void) |
152 |
{ |
153 |
return triangle->get_segment2(); |
154 |
} |
155 |
|
156 |
MG_SEGMENT* OPT_TRIANGLE::get_segment3(void) |
157 |
{ |
158 |
return triangle->get_segment3(); |
159 |
} |
160 |
|
161 |
int OPT_TRIANGLE::get_dimension(void) |
162 |
{ |
163 |
return 2; |
164 |
} |
165 |
|
166 |
double OPT_TRIANGLE::get_longueur(void) |
167 |
{ |
168 |
return triangle->get_longueur(); |
169 |
} |
170 |
|
171 |
TPL_LISTE_ENTITE<class MG_TETRA*>* OPT_TRIANGLE::get_lien_tetra(void) |
172 |
{ |
173 |
return triangle->get_lien_tetra(); |
174 |
} |
175 |
|
176 |
int OPT_TRIANGLE::get_num(void) |
177 |
{ |
178 |
return num; |
179 |
} |
180 |
|
181 |
void OPT_TRIANGLE::change_num(int val) |
182 |
{ |
183 |
num=val; |
184 |
} |
185 |
|
186 |
|
187 |
BOITE_2D OPT_TRIANGLE::get_boite_2D(double periodeu,double periodev) |
188 |
{ |
189 |
return triangle->get_boite_2D(periodeu,periodev); |
190 |
} |
191 |
|
192 |
BOITE_3D OPT_TRIANGLE::get_boite_3D(void) |
193 |
{ |
194 |
return triangle->get_boite_3D(); |
195 |
} |
196 |
|
197 |
|
198 |
OPT_TRIANGLE* OPT_TRIANGLE::get_voisin1(void) |
199 |
{ |
200 |
return voisin1; |
201 |
} |
202 |
|
203 |
OPT_TRIANGLE* OPT_TRIANGLE::get_voisin2(void) |
204 |
{ |
205 |
return voisin2; |
206 |
} |
207 |
|
208 |
OPT_TRIANGLE* OPT_TRIANGLE::get_voisin3(void) |
209 |
{ |
210 |
return voisin3; |
211 |
} |
212 |
|
213 |
void OPT_TRIANGLE::change_voisin1(OPT_TRIANGLE* tri) |
214 |
{ |
215 |
voisin1=tri; |
216 |
} |
217 |
|
218 |
void OPT_TRIANGLE::change_voisin2(OPT_TRIANGLE* tri) |
219 |
{ |
220 |
voisin2=tri; |
221 |
} |
222 |
|
223 |
void OPT_TRIANGLE::change_voisin3(OPT_TRIANGLE* tri) |
224 |
{ |
225 |
voisin3=tri; |
226 |
} |