From 03e24be593010e4784543720c636affbfceb40a7 Mon Sep 17 00:00:00 2001 From: Christophe Geuzaine <cgeuzaine@ulg.ac.be> Date: Sat, 24 Apr 2004 06:13:45 +0000 Subject: [PATCH] Removed General.MovingLight option (confusing, and never really worked anyway) --- Common/Context.h | 1 - Common/DefaultOptions.h | 2 -- Common/Options.cpp | 13 +------------ Common/Options.h | 1 - Fltk/Callbacks.cpp | 3 +-- Fltk/GUI.cpp | 7 +------ Graphics/Mesh.cpp | 9 ++------- 7 files changed, 5 insertions(+), 31 deletions(-) diff --git a/Common/Context.h b/Common/Context.h index 8807f91043..22722eeb6a 100644 --- a/Common/Context.h +++ b/Common/Context.h @@ -124,7 +124,6 @@ public : double vxmin, vxmax, vymin, vymax; // current viewport in real coordinates int light[6]; // status of light float light_position[6][4]; // light sources positions - int moving_light; // type of light (follows the model or not) float shine; // specular value int render_mode; // GMSH_RENDER, GMSH_SELECT, GMSH_FEEDBACK int clip[6]; // status of clip planes diff --git a/Common/DefaultOptions.h b/Common/DefaultOptions.h index 4192f0369d..a6a8a21663 100644 --- a/Common/DefaultOptions.h +++ b/Common/DefaultOptions.h @@ -529,8 +529,6 @@ StringXNumber GeneralOptions_Number[] = { "Height (in pixels) of the message window" }, { F|S, "MessageWidth" , opt_general_message_size0 , 450. , "Width (in pixels) of the message window" }, - { F|O, "MovingLight" , opt_general_moving_light , 0. , - "Use a moving (i.e. which follows the model) light source" }, { F|S, "OptionsPositionX" , opt_general_option_position0 , 650. , "Horizontal position (in pixels) of the upper left corner of the option window" }, diff --git a/Common/Options.cpp b/Common/Options.cpp index 916f6fdbfa..230ce4d18e 100644 --- a/Common/Options.cpp +++ b/Common/Options.cpp @@ -1,4 +1,4 @@ -// $Id: Options.cpp,v 1.148 2004-04-24 02:13:07 geuzaine Exp $ +// $Id: Options.cpp,v 1.149 2004-04-24 06:13:45 geuzaine Exp $ // // Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle // @@ -2610,17 +2610,6 @@ double opt_general_clip5d(OPT_ARGS_NUM) return CTX.clip_plane[5][3]; } -double opt_general_moving_light(OPT_ARGS_NUM) -{ - if(action & GMSH_SET) - CTX.moving_light = (int)val; -#if defined(HAVE_FLTK) - if(WID && (action & GMSH_GUI)) - WID->gen_butt[12]->value(CTX.moving_light); -#endif - return CTX.moving_light; -} - double opt_general_light0(OPT_ARGS_NUM) { if(action & GMSH_SET) diff --git a/Common/Options.h b/Common/Options.h index 813a58f8fc..8567e84dc4 100644 --- a/Common/Options.h +++ b/Common/Options.h @@ -285,7 +285,6 @@ double opt_general_clip5a(OPT_ARGS_NUM); double opt_general_clip5b(OPT_ARGS_NUM); double opt_general_clip5c(OPT_ARGS_NUM); double opt_general_clip5d(OPT_ARGS_NUM); -double opt_general_moving_light(OPT_ARGS_NUM); double opt_general_light0(OPT_ARGS_NUM); double opt_general_light00(OPT_ARGS_NUM); double opt_general_light01(OPT_ARGS_NUM); diff --git a/Fltk/Callbacks.cpp b/Fltk/Callbacks.cpp index b9c8f73126..d42c309826 100644 --- a/Fltk/Callbacks.cpp +++ b/Fltk/Callbacks.cpp @@ -1,4 +1,4 @@ -// $Id: Callbacks.cpp,v 1.221 2004-04-24 02:13:07 geuzaine Exp $ +// $Id: Callbacks.cpp,v 1.222 2004-04-24 06:13:45 geuzaine Exp $ // // Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle // @@ -1035,7 +1035,6 @@ void general_options_ok_cb(CALLBACK_ARGS) Print_Options(0, GMSH_SESSIONRC, CTX.sessionrc_filename); opt_general_options_save(0, GMSH_SET, WID->gen_butt[9]->value()); opt_general_orthographic(0, GMSH_SET, WID->gen_butt[10]->value()); - opt_general_moving_light(0, GMSH_SET, WID->gen_butt[12]->value()); opt_general_tooltips(0, GMSH_SET, WID->gen_butt[13]->value()); opt_general_confirm_overwrite(0, GMSH_SET, WID->gen_butt[14]->value()); opt_general_rotation_center_cg(0, GMSH_SET, WID->gen_butt[15]->value()); diff --git a/Fltk/GUI.cpp b/Fltk/GUI.cpp index 80fc8e8a7e..45a655f178 100644 --- a/Fltk/GUI.cpp +++ b/Fltk/GUI.cpp @@ -1,4 +1,4 @@ -// $Id: GUI.cpp,v 1.292 2004-04-24 02:13:07 geuzaine Exp $ +// $Id: GUI.cpp,v 1.293 2004-04-24 06:13:45 geuzaine Exp $ // // Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle // @@ -1587,11 +1587,6 @@ void GUI::create_option_window() gen_value[4]->step(0.01); gen_value[4]->align(FL_ALIGN_RIGHT); - gen_butt[12] = new Fl_Check_Button(2 * IW - 2 * WB, 2 * WB + 3 * BH, (int)(1.5*BB), BH, "Moving light"); - gen_butt[12]->type(FL_TOGGLE_BUTTON); - gen_butt[12]->down_box(TOGGLE_BOX); - gen_butt[12]->selection_color(TOGGLE_COLOR); - gen_value[1] = new Fl_Value_Input(2 * WB, 2 * WB + 4 * BH, IW, BH, "Material shininess"); gen_value[1]->minimum(0); gen_value[1]->maximum(10); diff --git a/Graphics/Mesh.cpp b/Graphics/Mesh.cpp index dfca52965d..0fbb666675 100644 --- a/Graphics/Mesh.cpp +++ b/Graphics/Mesh.cpp @@ -1,4 +1,4 @@ -// $Id: Mesh.cpp,v 1.78 2004-04-21 07:15:17 geuzaine Exp $ +// $Id: Mesh.cpp,v 1.79 2004-04-24 06:13:45 geuzaine Exp $ // // Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle // @@ -79,14 +79,9 @@ void Draw_Mesh(Mesh * M) { int i; - if(!CTX.moving_light) - InitRenderModel(); - + InitRenderModel(); InitPosition(); - if(CTX.moving_light) - InitRenderModel(); - for(i = 0; i < 6; i++) if(CTX.clip[i]) glClipPlane((GLenum) (GL_CLIP_PLANE0 + i), CTX.clip_plane[i]); -- GitLab