MAGiC
V5.0
Mailleurs Automatiques de Géometries intégrés à la Cao
mg_cg_op_transf_rotation.cpp
Aller à la documentation de ce fichier.
1
//####//------------------------------------------------------------
2
//####//------------------------------------------------------------
3
//####// MAGiC
4
//####// Jean Christophe Cuilliere et Vincent FRANCOIS
5
//####// Departement de Genie Mecanique - UQTR
6
//####//------------------------------------------------------------
7
//####// MAGIC est un projet de recherche de l equipe ERICCA
8
//####// du departement de genie mecanique de l Universite du Quebec a Trois Rivieres
9
//####// http://www.uqtr.ca/ericca
10
//####// http://www.uqtr.ca/
11
//####//------------------------------------------------------------
12
//####//------------------------------------------------------------
13
//####//
14
//####// mg_cg_op_transf_rotation.cpp
15
//####//
16
//####//------------------------------------------------------------
17
//####//------------------------------------------------------------
18
//####// COPYRIGHT 2000-2024
19
//####// jeu 13 jun 2024 11:58:55 EDT
20
//####//------------------------------------------------------------
21
//####//------------------------------------------------------------
22
#include "
mg_cg_op_transf_rotation.h
"
23
#include "
ot_mathematique.h
"
24
#include "
mg_cg_forme.h
"
25
#include "
mg_cg_modele.h
"
26
MG_CG_OP_TRANSF_ROTATION::MG_CG_OP_TRANSF_ROTATION
(
MG_CG_MODELE
* mgcg_modele,
27
int
semantique,
28
MG_CG_FORME
* mgcg_forme_entree):
MG_CG_OP_TRANSFORMATION
(mgcg_modele,semantique, mgcg_forme_entree)
29
{
30
m_centre_rotation
[0]=0.0;
31
m_centre_rotation
[1]=0.0;
32
m_centre_rotation
[2]=0.0;
33
}
34
35
MG_CG_OP_TRANSF_ROTATION::MG_CG_OP_TRANSF_ROTATION
(
MG_CG_MODELE
* mgcg_modele,
36
int
semantique,
37
int
etat,
38
long
unsigned
int
num,
39
MG_CG_FORME
* mgcg_forme_entree,
40
long
int
id_mgcg_forme_sortie):
MG_CG_OP_TRANSFORMATION
(mgcg_modele,semantique,etat,num,mgcg_forme_entree,id_mgcg_forme_sortie)
41
{
42
m_centre_rotation
[0]=0.0;
43
m_centre_rotation
[1]=0.0;
44
m_centre_rotation
[2]=0.0;
45
}
46
47
MG_CG_OP_TRANSF_ROTATION::MG_CG_OP_TRANSF_ROTATION
(
MG_CG_OP_TRANSF_ROTATION
& mdd):
MG_CG_OP_TRANSFORMATION
(mdd)
48
{
49
m_centre_rotation
[0]=mdd.
m_centre_rotation
[0];
50
m_centre_rotation
[1]=mdd.
m_centre_rotation
[1];
51
m_centre_rotation
[2]=mdd.
m_centre_rotation
[2];
52
m_quaternion
.
change_x
(mdd.
m_quaternion
.
get_x
());
53
m_quaternion
.
change_y
(mdd.
m_quaternion
.
get_y
());
54
m_quaternion
.
change_z
(mdd.
m_quaternion
.
get_z
());
55
m_quaternion
.
change_w
(mdd.
m_quaternion
.
get_w
());
56
}
57
58
MG_CG_OP_TRANSF_ROTATION::~MG_CG_OP_TRANSF_ROTATION
()
59
{
60
61
}
62
63
int
MG_CG_OP_TRANSF_ROTATION::get_type_operateur_transformation
(
void
)
64
{
65
return
MG_CG_OP_TRANSFORMATION::TYPE_OPERATEUR_TRANSFORMATION::ROTATION;
66
}
67
68
void
MG_CG_OP_TRANSF_ROTATION::change_rotation
(
OT_QUATERNION
& quaternion)
69
{
70
m_quaternion
=quaternion;
71
}
72
73
void
MG_CG_OP_TRANSF_ROTATION::get_rotation
(
OT_QUATERNION
& quaternion)
74
{
75
quaternion=
m_quaternion
;
76
}
77
78
void
MG_CG_OP_TRANSF_ROTATION::change_centre_rotation
(
double
x,
double
y,
double
z)
79
{
80
m_centre_rotation
[0]=x;
81
m_centre_rotation
[1]=y;
82
m_centre_rotation
[2]=z;
83
}
84
85
double
MG_CG_OP_TRANSF_ROTATION::get_centre_rotation_x
(
void
)
86
{
87
return
m_centre_rotation
[0];
88
}
89
90
double
MG_CG_OP_TRANSF_ROTATION::get_centre_rotation_y
(
void
)
91
{
92
return
m_centre_rotation
[1];
93
}
94
95
double
MG_CG_OP_TRANSF_ROTATION::get_centre_rotation_z
(
void
)
96
{
97
return
m_centre_rotation
[2];
98
}
99
100
void
MG_CG_OP_TRANSF_ROTATION::enregistrer
(std::ostream& o,
double
version)
101
{
102
o <<
"%"
<< get_id()
103
<<
"=MG_CG_OP_TRANSF_ROTATION("
104
<<
"$"
<<
m_mgcg_modele
->get_id()
105
<<
","
<<
m_semantique
106
<<
","
<<
m_etat
107
<<
",$"
<<
m_id_mgcg_forme_entree
108
<<
",$"
<<
m_id_mgcg_forme_sortie
109
<<
","
<<
m_quaternion
.
get_x
()
110
<<
","
<<
m_quaternion
.
get_y
()
111
<<
","
<<
m_quaternion
.
get_z
()
112
<<
","
<<
m_quaternion
.
get_w
()
113
<<
","
<<
m_centre_rotation
[0]
114
<<
","
<<
m_centre_rotation
[1]
115
<<
","
<<
m_centre_rotation
[2]
116
<<
");"
<< std::endl;
117
enregistrer_infos(o,version);
118
}
119
MG_CG_OP_TRANSF_ROTATION::enregistrer
virtual void enregistrer(std::ostream &o, double version)
Definition:
mg_cg_op_transf_rotation.cpp:100
MG_CG_OP_TRANSF_ROTATION::m_quaternion
OT_QUATERNION m_quaternion
Definition:
mg_cg_op_transf_rotation.h:59
mg_cg_forme.h
MG_CG_OP_TRANSF_ROTATION::get_centre_rotation_x
virtual double get_centre_rotation_x(void)
Definition:
mg_cg_op_transf_rotation.cpp:85
mg_cg_op_transf_rotation.h
MG_CG_OP_TRANSF_ROTATION::~MG_CG_OP_TRANSF_ROTATION
virtual ~MG_CG_OP_TRANSF_ROTATION()
Definition:
mg_cg_op_transf_rotation.cpp:58
MG_CG_OP_TRANSF_ROTATION::MG_CG_OP_TRANSF_ROTATION
MG_CG_OP_TRANSF_ROTATION(MG_CG_MODELE *mgcg_modele, int semantique, MG_CG_FORME *mgcg_forme_entree)
Definition:
mg_cg_op_transf_rotation.cpp:26
MG_CG_OPERATEUR::m_mgcg_modele
MG_CG_MODELE * m_mgcg_modele
Definition:
mg_cg_operateur.h:81
OT_QUATERNION::get_x
double get_x(void)
Definition:
ot_mathematique.cpp:331
OT_QUATERNION::get_z
double get_z(void)
Definition:
ot_mathematique.cpp:351
MG_CG_OP_TRANSF_ROTATION::get_type_operateur_transformation
virtual int get_type_operateur_transformation(void)
Definition:
mg_cg_op_transf_rotation.cpp:63
MG_CG_OP_TRANSF_ROTATION::m_centre_rotation
double m_centre_rotation[3]
Definition:
mg_cg_op_transf_rotation.h:60
MG_CG_OP_TRANSFORMATION::m_id_mgcg_forme_sortie
unsigned long m_id_mgcg_forme_sortie
Definition:
mg_cg_op_transformation.h:60
MG_CG_OP_TRANSF_ROTATION::get_centre_rotation_z
virtual double get_centre_rotation_z(void)
Definition:
mg_cg_op_transf_rotation.cpp:95
MG_CG_OP_TRANSF_ROTATION::change_centre_rotation
virtual void change_centre_rotation(double x, double y, double z)
Definition:
mg_cg_op_transf_rotation.cpp:78
OT_QUATERNION::change_y
void change_y(double y)
Definition:
ot_mathematique.cpp:346
OT_QUATERNION::get_w
double get_w(void)
Definition:
ot_mathematique.cpp:361
MG_CG_FORME
Definition:
mg_cg_forme.h:41
MG_CG_OP_TRANSF_ROTATION::get_centre_rotation_y
virtual double get_centre_rotation_y(void)
Definition:
mg_cg_op_transf_rotation.cpp:90
OT_QUATERNION::change_z
void change_z(double z)
Definition:
ot_mathematique.cpp:356
OT_QUATERNION::change_w
void change_w(double w)
Definition:
ot_mathematique.cpp:366
OT_QUATERNION::get_y
double get_y(void)
Definition:
ot_mathematique.cpp:341
MG_CG_MODELE
Definition:
mg_cg_modele.h:41
OT_QUATERNION
Definition:
ot_mathematique.h:71
ot_mathematique.h
MG_CG_OPERATEUR::m_etat
int m_etat
Definition:
mg_cg_operateur.h:82
mg_cg_modele.h
MG_CG_OPERATEUR::m_semantique
int m_semantique
Definition:
mg_cg_operateur.h:83
MG_CG_OP_TRANSFORMATION::m_id_mgcg_forme_entree
unsigned long m_id_mgcg_forme_entree
Definition:
mg_cg_op_transformation.h:59
OT_QUATERNION::change_x
void change_x(double x)
Definition:
ot_mathematique.cpp:336
MG_CG_OP_TRANSF_ROTATION
Definition:
mg_cg_op_transf_rotation.h:34
MG_CG_OP_TRANSFORMATION
Definition:
mg_cg_op_transformation.h:35
MG_CG_OP_TRANSF_ROTATION::change_rotation
virtual void change_rotation(OT_QUATERNION &quaternion)
Definition:
mg_cg_op_transf_rotation.cpp:68
MG_CG_OP_TRANSF_ROTATION::get_rotation
virtual void get_rotation(OT_QUATERNION &quaternion)
Definition:
mg_cg_op_transf_rotation.cpp:73
home
francois
tmp
lib
mtu
src
mg_cg_op_transf_rotation.cpp
Généré le Jeudi 12 Juin 2025 23:00:08 pour MAGiC par
1.8.17