MAGiC  V5.0
Mailleurs Automatiques de Géometries intégrés à la Cao
mg_cg_op_transf_translation.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_translation.cpp
15 //####//
16 //####//------------------------------------------------------------
17 //####//------------------------------------------------------------
18 //####// COPYRIGHT 2000-2024
19 //####// jeu 13 jun 2024 11:58:55 EDT
20 //####//------------------------------------------------------------
21 //####//------------------------------------------------------------
23 #include "mg_cg_modele.h"
25  int semantique,
26  MG_CG_FORME* mgcg_forme_entree): MG_CG_OP_TRANSFORMATION(mgcg_modele,semantique, mgcg_forme_entree)
27 {
28 
29 }
30 
32  int etat,
33  long unsigned int num,
34  MG_CG_FORME* mgcg_forme_entree,
35  long int id_mgcg_forme_sortie): MG_CG_OP_TRANSFORMATION(mgcg_modele,semantique,etat,num,mgcg_forme_entree,id_mgcg_forme_sortie)
36 {
37 
38 }
39 
41 {
45 }
46 
48 {
49 
50 }
51 
53 {
54  return MG_CG_OP_TRANSFORMATION::TYPE_OPERATEUR_TRANSFORMATION::TRANSLATION;
55 }
56 
57 void MG_CG_OP_TRANSF_TRANSLATION::change_translation(double x, double y, double z)
58 {
62 }
63 
65 {
66  return m_vecteur_translation[0];
67 }
68 
70 {
71  return m_vecteur_translation[1];
72 }
73 
75 {
76  return m_vecteur_translation[2];
77 }
78 
79 void MG_CG_OP_TRANSF_TRANSLATION::enregistrer(std::ostream& o, double version)
80 {
81  o << "%" << get_id()
82  << "=MG_CG_OP_TRANSF_TRANSLATION("
83  << "$" << m_mgcg_modele->get_id()
84  << "," << m_semantique
85  << "," << m_etat
86  << ",$" << m_id_mgcg_forme_entree
87  << ",$" << m_id_mgcg_forme_sortie
88  << "," << m_vecteur_translation[0]
89  << "," << m_vecteur_translation[1]
90  << "," << m_vecteur_translation[2]
91  << ");" << std::endl;
92  enregistrer_infos(o,version);
93 }
MG_CG_OP_TRANSF_TRANSLATION::enregistrer
virtual void enregistrer(std::ostream &o, double version)
Definition: mg_cg_op_transf_translation.cpp:79
MG_CG_OP_TRANSF_TRANSLATION::MG_CG_OP_TRANSF_TRANSLATION
MG_CG_OP_TRANSF_TRANSLATION(MG_CG_MODELE *mgcg_modele, int semantique, MG_CG_FORME *mgcg_forme_entree)
Definition: mg_cg_op_transf_translation.cpp:24
MG_CG_OP_TRANSF_TRANSLATION::get_translation_x
virtual double get_translation_x(void)
Definition: mg_cg_op_transf_translation.cpp:64
MG_CG_OP_TRANSF_TRANSLATION::get_translation_z
virtual double get_translation_z(void)
Definition: mg_cg_op_transf_translation.cpp:74
MG_CG_OPERATEUR::m_mgcg_modele
MG_CG_MODELE * m_mgcg_modele
Definition: mg_cg_operateur.h:81
MG_CG_OP_TRANSF_TRANSLATION::get_translation_y
virtual double get_translation_y(void)
Definition: mg_cg_op_transf_translation.cpp:69
MG_CG_OP_TRANSF_TRANSLATION::get_type_operateur_transformation
virtual int get_type_operateur_transformation(void)
Definition: mg_cg_op_transf_translation.cpp:52
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_TRANSLATION::change_translation
virtual void change_translation(double x, double y, double z)
Definition: mg_cg_op_transf_translation.cpp:57
MG_CG_FORME
Definition: mg_cg_forme.h:41
MG_CG_OP_TRANSF_TRANSLATION::~MG_CG_OP_TRANSF_TRANSLATION
virtual ~MG_CG_OP_TRANSF_TRANSLATION()
Definition: mg_cg_op_transf_translation.cpp:47
mg_cg_op_transf_translation.h
MG_CG_MODELE
Definition: mg_cg_modele.h:41
MG_CG_OP_TRANSF_TRANSLATION::m_vecteur_translation
double m_vecteur_translation[3]
Definition: mg_cg_op_transf_translation.h:55
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
MG_CG_OP_TRANSF_TRANSLATION
Definition: mg_cg_op_transf_translation.h:33
MG_CG_OP_TRANSFORMATION
Definition: mg_cg_op_transformation.h:35