Back to home page

EIC code displayed by LXR

 
 

    


Warning, /include/Geant4/tools/sg/get_matrix_action is written in an unsupported language. File is not indexed.

0001 // Copyright (C) 2010, Guy Barrand. All rights reserved.
0002 // See the file tools.license for terms.
0003 
0004 #ifndef tools_sg_get_matrix_action
0005 #define tools_sg_get_matrix_action
0006 
0007 #include "matrix_action"
0008 
0009 namespace tools {
0010 namespace sg {
0011   class node;
0012 }}
0013 
0014 namespace tools {
0015 namespace sg {
0016 
0017 class get_matrix_action : public matrix_action {
0018   TOOLS_ACTION(get_matrix_action,tools::sg::get_matrix_action,matrix_action)
0019 public:
0020   get_matrix_action(std::ostream& a_out,unsigned int a_ww,unsigned int a_wh)
0021   :matrix_action(a_out,a_ww,a_wh)
0022   ,m_node(0) //not owner
0023   ,m_done(false)
0024   {}
0025   virtual ~get_matrix_action(){}
0026 public:
0027   get_matrix_action(const get_matrix_action& a_from)
0028   :matrix_action(a_from)
0029   ,m_node(a_from.m_node)
0030   ,m_done(false)
0031   {}
0032   get_matrix_action& operator=(const get_matrix_action& a_from){
0033     matrix_action::operator=(a_from);
0034     m_node = a_from.m_node;
0035     reset();
0036     return *this;
0037   }
0038 public:
0039   void reset() {
0040     m_found_model.set_zero();
0041     m_done = false;
0042   }
0043 
0044   void set_found_model(const mat4f& a_m) {m_found_model = a_m;}
0045   const mat4f& found_model() const {return m_found_model;}
0046 
0047   void set_done(bool a_value) {m_done = a_value;}
0048   bool done() const {return m_done;}
0049 
0050   void set_node(sg::node* a_v) {m_node = a_v;}
0051   sg::node* node() const {return m_node;}
0052 
0053 protected:
0054   sg::node* m_node; //not owner.
0055   bool m_done;
0056   mat4f m_found_model;
0057 };
0058 
0059 }}
0060 
0061 #endif