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 |
|
|
// mg_coarete.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_coarete.h" |
27 |
|
|
|
28 |
|
|
|
29 |
|
|
|
30 |
|
|
MG_COARETE::MG_COARETE(unsigned long num,class MG_ARETE* mgarete,class MG_BOUCLE* mgboucle,int sens):MG_ELEMENT_COTOPOLOGIQUE(num),arete(mgarete),boucle(mgboucle),orientation(sens) |
31 |
|
|
{ |
32 |
|
|
} |
33 |
|
|
|
34 |
|
|
|
35 |
|
|
MG_COARETE::MG_COARETE(class MG_ARETE* mgarete,class MG_BOUCLE* mgboucle,int sens):MG_ELEMENT_COTOPOLOGIQUE(),arete(mgarete),boucle(mgboucle),orientation(sens) |
36 |
|
|
{ |
37 |
|
|
} |
38 |
|
|
|
39 |
|
|
MG_COARETE::MG_COARETE(class MG_COARETE& mdd):MG_ELEMENT_COTOPOLOGIQUE(),arete(mdd.arete),boucle(mdd.boucle),orientation(mdd.orientation) |
40 |
|
|
{ |
41 |
|
|
} |
42 |
|
|
|
43 |
|
|
|
44 |
|
|
MG_COARETE::~MG_COARETE() |
45 |
|
|
{ |
46 |
|
|
} |
47 |
|
|
|
48 |
|
|
MG_BOUCLE* MG_COARETE::get_boucle(void) |
49 |
|
|
{ |
50 |
|
|
return boucle; |
51 |
|
|
} |
52 |
|
|
|
53 |
|
|
MG_ARETE* MG_COARETE::get_arete(void) |
54 |
|
|
{ |
55 |
|
|
return arete; |
56 |
|
|
} |
57 |
|
|
|
58 |
|
|
|
59 |
|
|
void MG_COARETE::change_arete(MG_ARETE* are,int sens) |
60 |
|
|
{ |
61 |
|
|
arete=are; |
62 |
|
|
orientation=orientation*sens; |
63 |
|
|
} |
64 |
|
|
|
65 |
|
|
|
66 |
|
|
int MG_COARETE::get_orientation(void) |
67 |
|
|
{ |
68 |
|
|
return orientation; |
69 |
|
|
} |
70 |
|
|
|
71 |
francois |
763 |
void MG_COARETE::enregistrer(std::ostream& o,double version) |
72 |
francois |
283 |
{ |
73 |
|
|
o << "%" << get_id() << "=COARETE($"<< arete->get_id() << ",$"<<boucle->get_id() << "," << orientation << ");" << std::endl; |
74 |
|
|
} |
75 |
|
|
|
76 |
|
|
|