Import Geant4 10.7.0 source tree
This commit is contained in:
@@ -17,26 +17,20 @@ class head_light : public torche {
|
||||
public:
|
||||
virtual void render(render_action& a_action) {
|
||||
if(!on.value()) return;
|
||||
|
||||
state& state = a_action.state();
|
||||
|
||||
if((state.m_light+1)>=a_action.max_lights()) {
|
||||
a_action.out()
|
||||
a_action.out()
|
||||
<< "GL_MAX_LIGHTS (" << a_action.max_lights() << ") reached."
|
||||
<< std::endl;
|
||||
return;
|
||||
}
|
||||
|
||||
float dx = direction.value()[0];
|
||||
float dy = direction.value()[1];
|
||||
float dz = direction.value()[2];
|
||||
|
||||
{mat4f mtx;
|
||||
state.m_camera_orientation.value(mtx);
|
||||
mtx.mul_3f(dx,dy,dz);}
|
||||
|
||||
mtx.mul_dir_3f(dx,dy,dz);}
|
||||
state.m_GL_LIGHTING = true; //for separator
|
||||
|
||||
a_action.enable_light(state.m_light,vec3f(dx,dy,dz),color.value());
|
||||
state.m_light++;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user