Back to home page

EIC code displayed by LXR

 
 

    


Warning, /include/Geant4/tools/sg/separator 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_separator
0005 #define tools_sg_separator
0006 
0007 #include "group"
0008 #include "render_action"
0009 #include "bbox_action"
0010 #include "visible_action"
0011 
0012 namespace tools {
0013 namespace sg {
0014 
0015 class separator : public group {
0016   TOOLS_NODE(separator,tools::sg::separator,group)
0017 public: //node
0018   virtual void render(render_action& a_action) {
0019     a_action.push_matrices();
0020     a_action.push_state();
0021 
0022     parent::render(a_action);
0023 
0024     unsigned int ret_num_light = a_action.state().m_light;
0025 
0026     a_action.pop_matrices();
0027     a_action.pop_state();
0028 
0029     a_action.restore_state(ret_num_light);
0030   }
0031   virtual void pick(pick_action& a_action) {
0032     a_action.push_matrices();
0033     a_action.push_state();
0034     parent::pick(a_action);
0035     a_action.pop_matrices();
0036     a_action.pop_state();
0037   }
0038   virtual void bbox(bbox_action& a_action) {
0039     a_action.push_matrices();
0040     a_action.push_state();
0041     parent::bbox(a_action);
0042     a_action.pop_matrices();
0043     a_action.pop_state();
0044   }
0045   virtual void event(event_action& a_action) {
0046     a_action.push_matrices();
0047     a_action.push_state();
0048     parent::event(a_action);
0049     a_action.pop_matrices();
0050     a_action.pop_state();
0051   }
0052   virtual void get_matrix(get_matrix_action& a_action) {
0053     a_action.push_matrices();
0054     a_action.push_state();
0055     parent::get_matrix(a_action);
0056     a_action.pop_matrices();
0057     a_action.pop_state();
0058   }
0059   virtual bool write(write_action& a_action) {
0060     if(!a_action.beg_node(*this)) return false;
0061     if(!write_fields(a_action)) return false;
0062     if(!write_children(a_action)) return false;
0063     if(!a_action.end_node(*this)) return false;
0064     return true;
0065   }
0066   virtual void is_visible(visible_action& a_action) {
0067     a_action.push_matrices();
0068     a_action.push_state();
0069     parent::is_visible(a_action);
0070     a_action.pop_matrices();
0071     a_action.pop_state();
0072   }
0073 public:
0074   separator():parent(){
0075 #ifdef TOOLS_MEM
0076     mem::increment(s_class().c_str());
0077 #endif
0078   }
0079   virtual ~separator(){
0080 #ifdef TOOLS_MEM
0081     mem::decrement(s_class().c_str());
0082 #endif
0083   }
0084 public:
0085   separator(const separator& a_from):parent(a_from){
0086 #ifdef TOOLS_MEM
0087     mem::increment(s_class().c_str());
0088 #endif
0089   }
0090   separator& operator=(const separator& a_from){
0091     parent::operator=(a_from);
0092     return *this;
0093   }
0094 };
0095 
0096 }}
0097 
0098 #endif