0032121: Draw Harness, ViewerTest - implement -reset option for vlight command
authorkgv <kgv@opencascade.com>
Fri, 9 Jul 2021 20:22:29 +0000 (23:22 +0300)
committerkgv <kgv@opencascade.com>
Mon, 12 Jul 2021 17:50:25 +0000 (20:50 +0300)
commit06d40093b715adf9cb1e36d25e5fde6bef2f7b41
tree19a3b62b26b58fefa8b36aac513c4d1a3883c37f
parentcb7f92396f80270e13206be742038ca0ce04571a
0032121: Draw Harness, ViewerTest - implement -reset option for vlight command

vlight command has been revised to provide more friendly syntax.
Command now accepts light index or name as first argument.
Added arguments -enable/-disable for managing enabled state.
Added argument -reset to reset light parameters to default values.

V3d_Viewer::SetDefaultLights() now sets names "headlight" and "ambient" to created lights.
Graphic3d_TypeOfLightSource enumeration values have been renamed to avoid shortcuts.
Draw::Atof(), applied corrections to avoid explicit new/delete calls.
44 files changed:
samples/tcl/Penrose.tcl
samples/tcl/cpu.tcl
samples/tcl/pathtrace_ball.tcl
samples/tcl/pathtrace_cube.tcl
samples/tcl/pathtrace_materials.tcl
samples/tcl/raytrace.tcl
samples/webgl/WasmOcctView.cpp
src/AIS/AIS_LightSource.cxx
src/Draw/Draw_VariableCommands.cxx
src/Graphic3d/Graphic3d_CLight.cxx
src/Graphic3d/Graphic3d_CLight.hxx
src/Graphic3d/Graphic3d_LightSet.cxx
src/Graphic3d/Graphic3d_LightSet.hxx
src/Graphic3d/Graphic3d_ShaderManager.cxx
src/Graphic3d/Graphic3d_TypeOfLightSource.hxx
src/OpenGl/OpenGl_ShaderManager.cxx
src/OpenGl/OpenGl_ShadowMap.cxx
src/OpenGl/OpenGl_View.cxx
src/OpenGl/OpenGl_View_Raytrace.cxx
src/V3d/V3d_AmbientLight.cxx
src/V3d/V3d_DirectionalLight.cxx
src/V3d/V3d_PositionalLight.cxx
src/V3d/V3d_SpotLight.cxx
src/V3d/V3d_Viewer.cxx
src/ViewerTest/ViewerTest_ViewerCommands.cxx
tests/opengl/data/general/double_precision
tests/opengl/data/general/light_off
tests/opengl/data/raytrace/bug25201
tests/opengl/data/raytrace/refraction
tests/opengl/data/shaderprog/phong_fuse
tests/opengl/data/shaderprog/phong_fuse2
tests/opengl/data/shading/flat_fuse1
tests/opengl/data/shading/gouraud_dir2
tests/opengl/data/shading/gouraud_pos1
tests/opengl/data/shading/gouraud_spot1
tests/opengl/data/shading/phong_dir2
tests/opengl/data/shading/phong_pos2
tests/opengl/data/shading/phong_pos3
tests/opengl/data/shading/phong_pos4
tests/opengl/data/shading/phong_spot1
tests/opengl/data/textures/bug24725
tests/v3d/light_source/display_all
tests/v3d/light_source/headlight
tests/v3d/light_source/manipulator