Warning, /include/Geant4/tools/sg/light_off 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_light_off
0005 #define tools_sg_light_off
0006
0007 // A node to cancel/switch of the lighting during a render traversal.
0008
0009 #include "node"
0010 #include "render_action"
0011
0012 namespace tools {
0013 namespace sg {
0014
0015 class light_off : public node {
0016 TOOLS_NODE(light_off,tools::sg::light_off,node)
0017 public:
0018 virtual void render(render_action& a_action) {
0019 state& state = a_action.state();
0020 state.m_GL_LIGHTING = false;
0021 a_action.set_lighting(false);
0022 }
0023 public:
0024 light_off():parent() {}
0025 virtual ~light_off(){}
0026 public:
0027 light_off(const light_off& a_from):parent(a_from){}
0028 light_off& operator=(const light_off& a_from){
0029 parent::operator=(a_from);
0030 return *this;
0031 }
0032 };
0033
0034 }}
0035
0036 #endif