Geant4 Cross Reference |
1 // Copyright (C) 2010, Guy Barrand. All rights 2 // See the file tools.license for terms. 3 4 #ifndef tools_sg_get_matrix_action 5 #define tools_sg_get_matrix_action 6 7 #include "matrix_action" 8 9 namespace tools { 10 namespace sg { 11 class node; 12 }} 13 14 namespace tools { 15 namespace sg { 16 17 class get_matrix_action : public matrix_action 18 TOOLS_ACTION(get_matrix_action,tools::sg::ge 19 public: 20 get_matrix_action(std::ostream& a_out,unsign 21 :matrix_action(a_out,a_ww,a_wh) 22 ,m_node(0) //not owner 23 ,m_done(false) 24 {} 25 virtual ~get_matrix_action(){} 26 public: 27 get_matrix_action(const get_matrix_action& a 28 :matrix_action(a_from) 29 ,m_node(a_from.m_node) 30 ,m_done(false) 31 {} 32 get_matrix_action& operator=(const get_matri 33 matrix_action::operator=(a_from); 34 m_node = a_from.m_node; 35 reset(); 36 return *this; 37 } 38 public: 39 void reset() { 40 m_found_model.set_zero(); 41 m_done = false; 42 } 43 44 void set_found_model(const mat4f& a_m) {m_fo 45 const mat4f& found_model() const {return m_f 46 47 void set_done(bool a_value) {m_done = a_valu 48 bool done() const {return m_done;} 49 50 void set_node(sg::node* a_v) {m_node = a_v;} 51 sg::node* node() const {return m_node;} 52 53 protected: 54 sg::node* m_node; //not owner. 55 bool m_done; 56 mat4f m_found_model; 57 }; 58 59 }} 60 61 #endif