From 5a407fc2e2a80ab989252342bf70661748f9905a Mon Sep 17 00:00:00 2001 From: unknown <19jrushlow@gmail.com> Date: Sun, 9 Feb 2025 12:15:32 -0500 Subject: [PATCH 01/10] added opacity binding, still having issues with updating the number displayed on the cheatsheet, it only updates when another binding is called --- library/src/interactor_impl.cxx | 36 +++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/library/src/interactor_impl.cxx b/library/src/interactor_impl.cxx index a07449fa6c..e5c31e1550 100644 --- a/library/src/interactor_impl.cxx +++ b/library/src/interactor_impl.cxx @@ -219,6 +219,24 @@ class interactor_impl::internals const int newIntensityPct = std::lround(intensity * 100) + (negative ? -offsetPp : +offsetPp); this->Options.render.light.intensity = std::max(newIntensityPct, 0) / 100.0; } + + //---------------------------------------------------------------------------- + // Increase/Decrease opacity + void IncreaseOpacity(bool negative) + { + // current opacity, interpreted as 1 if it does not exist + const double currentOpacity = this->Options.model.color.opacity.has_value() ? this->Options.model.color.opacity.value() : 1.0; + + // new opacity, clamped between 0 and 1 if not already set outside that range + const double increment = negative ? -0.05 : 0.05; + double newOpacity = currentOpacity + increment; + if (currentOpacity <= 1.0 && 0.0 <= currentOpacity) + { + newOpacity = std::min(1.0, std::max(0.0, newOpacity)); + } + + this->Options.model.color.opacity = newOpacity; + } //---------------------------------------------------------------------------- // Synchronise options from the renderer properties @@ -699,6 +717,12 @@ interactor& interactor_impl::initCommands() this->addCommand("decrease_light_intensity", [&](const std::vector&) { this->Internals->IncreaseLightIntensity(true); }); + this->addCommand("increase_opacity", + [&](const std::vector&) { this->Internals->IncreaseOpacity(false); }); + + this->addCommand("decrease_opacity", + [&](const std::vector&) { this->Internals->IncreaseOpacity(true); }); + this->addCommand("print_scene_info", [&](const std::vector&) { this->Internals->Window.PrintSceneDescription(log::VerboseLevel::INFO); }); @@ -938,6 +962,16 @@ interactor& interactor_impl::initBindings() valStream << val; return std::pair(doc, valStream.str()); }; + + // "doc", "value (default to 1)" + auto docDblOpt = [](const std::string& doc, const std::optional& val) + { + std::stringstream valStream; + valStream.precision(2); + valStream << std::fixed; + val.has_value() ? (valStream << val.value()) : (valStream << 1.0); + return std::pair(doc, valStream.str()); + }; // "doc", "ON/OFF" auto docTgl = [](const std::string& doc, const bool& val) @@ -978,6 +1012,8 @@ interactor& interactor_impl::initBindings() this->addBinding({mod_t::NONE, "J"}, "toggle render.background.skybox","Scene", std::bind(docTgl, "Toggle HDRI skybox", std::cref(opts.render.background.skybox))); this->addBinding({mod_t::NONE, "L"}, "increase_light_intensity", "Scene", std::bind(docDbl, "Increase lights intensity", std::cref(opts.render.light.intensity))); this->addBinding({mod_t::SHIFT, "L"}, "decrease_light_intensity", "Scene", std::bind(docDbl, "Decrease lights intensity", std::cref(opts.render.light.intensity))); + this->addBinding({mod_t::CTRL, "T"}, "increase_opacity", "Scene", std::bind(docDblOpt, "Increase opacity", std::cref(opts.model.color.opacity))); + this->addBinding({mod_t::SHIFT, "T"}, "decrease_opacity", "Scene", std::bind(docDblOpt, "Decrease opacity", std::cref(opts.model.color.opacity))); this->addBinding({mod_t::SHIFT, "A"}, "toggle render.armature.enable","Scene", std::bind(docTgl, "Toggle armature", std::cref(opts.render.armature.enable))); this->addBinding({mod_t::ANY, "1"}, "set_camera front", "Camera", std::bind(docStr, "Front View camera")); this->addBinding({mod_t::ANY, "3"}, "set_camera right", "Camera", std::bind(docStr, "Right View camera")); From 3980b8360276f5ad7bedc668bf228983ce2460ac Mon Sep 17 00:00:00 2001 From: unknown <19jrushlow@gmail.com> Date: Mon, 10 Feb 2025 20:19:38 -0500 Subject: [PATCH 02/10] minor reformatting, changed opacity binding to P, and SetOpacity() now invalidates the cheat sheet in order to allow the binding to properly update the number displayed on the cheat sheet --- library/src/interactor_impl.cxx | 36 ++++++++++++------------ vtkext/private/module/vtkF3DRenderer.cxx | 1 + 2 files changed, 19 insertions(+), 18 deletions(-) diff --git a/library/src/interactor_impl.cxx b/library/src/interactor_impl.cxx index e5c31e1550..81397050d5 100644 --- a/library/src/interactor_impl.cxx +++ b/library/src/interactor_impl.cxx @@ -224,18 +224,18 @@ class interactor_impl::internals // Increase/Decrease opacity void IncreaseOpacity(bool negative) { - // current opacity, interpreted as 1 if it does not exist - const double currentOpacity = this->Options.model.color.opacity.has_value() ? this->Options.model.color.opacity.value() : 1.0; - - // new opacity, clamped between 0 and 1 if not already set outside that range - const double increment = negative ? -0.05 : 0.05; - double newOpacity = currentOpacity + increment; - if (currentOpacity <= 1.0 && 0.0 <= currentOpacity) - { - newOpacity = std::min(1.0, std::max(0.0, newOpacity)); - } - - this->Options.model.color.opacity = newOpacity; + // current opacity, interpreted as 1 if it does not exist + const double currentOpacity = this->Options.model.color.opacity.has_value() ? this->Options.model.color.opacity.value() : 1.0; + + // new opacity, clamped between 0 and 1 if not already set outside that range + const double increment = negative ? -0.05 : 0.05; + double newOpacity = currentOpacity + increment; + if (currentOpacity <= 1.0 && 0.0 <= currentOpacity) + { + newOpacity = std::min(1.0, std::max(0.0, newOpacity)); + } + + this->Options.model.color.opacity = newOpacity; } //---------------------------------------------------------------------------- @@ -966,11 +966,11 @@ interactor& interactor_impl::initBindings() // "doc", "value (default to 1)" auto docDblOpt = [](const std::string& doc, const std::optional& val) { - std::stringstream valStream; - valStream.precision(2); + std::stringstream valStream; + valStream.precision(2); valStream << std::fixed; - val.has_value() ? (valStream << val.value()) : (valStream << 1.0); - return std::pair(doc, valStream.str()); + valStream << val.value_or(1.0); + return std::pair(doc, valStream.str()); }; // "doc", "ON/OFF" @@ -1012,8 +1012,8 @@ interactor& interactor_impl::initBindings() this->addBinding({mod_t::NONE, "J"}, "toggle render.background.skybox","Scene", std::bind(docTgl, "Toggle HDRI skybox", std::cref(opts.render.background.skybox))); this->addBinding({mod_t::NONE, "L"}, "increase_light_intensity", "Scene", std::bind(docDbl, "Increase lights intensity", std::cref(opts.render.light.intensity))); this->addBinding({mod_t::SHIFT, "L"}, "decrease_light_intensity", "Scene", std::bind(docDbl, "Decrease lights intensity", std::cref(opts.render.light.intensity))); - this->addBinding({mod_t::CTRL, "T"}, "increase_opacity", "Scene", std::bind(docDblOpt, "Increase opacity", std::cref(opts.model.color.opacity))); - this->addBinding({mod_t::SHIFT, "T"}, "decrease_opacity", "Scene", std::bind(docDblOpt, "Decrease opacity", std::cref(opts.model.color.opacity))); + this->addBinding({mod_t::CTRL, "P"}, "increase_opacity", "Scene", std::bind(docDblOpt, "Increase opacity", std::cref(opts.model.color.opacity))); + this->addBinding({mod_t::SHIFT, "P"}, "decrease_opacity", "Scene", std::bind(docDblOpt, "Decrease opacity", std::cref(opts.model.color.opacity))); this->addBinding({mod_t::SHIFT, "A"}, "toggle render.armature.enable","Scene", std::bind(docTgl, "Toggle armature", std::cref(opts.render.armature.enable))); this->addBinding({mod_t::ANY, "1"}, "set_camera front", "Camera", std::bind(docStr, "Front View camera")); this->addBinding({mod_t::ANY, "3"}, "set_camera right", "Camera", std::bind(docStr, "Right View camera")); diff --git a/vtkext/private/module/vtkF3DRenderer.cxx b/vtkext/private/module/vtkF3DRenderer.cxx index b4fdf57cb5..aba9f89d13 100644 --- a/vtkext/private/module/vtkF3DRenderer.cxx +++ b/vtkext/private/module/vtkF3DRenderer.cxx @@ -1681,6 +1681,7 @@ void vtkF3DRenderer::SetOpacity(const std::optional& opacity) { this->Opacity = opacity; this->ActorsPropertiesConfigured = false; + this->CheatSheetConfigured = false; } } From fd1d7bf6f893fef3fcacdc16ef0a8f0ffae28db4 Mon Sep 17 00:00:00 2001 From: unknown <19jrushlow@gmail.com> Date: Tue, 11 Feb 2025 13:36:01 -0500 Subject: [PATCH 03/10] minor syntax adjustment --- library/src/interactor_impl.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/src/interactor_impl.cxx b/library/src/interactor_impl.cxx index 81397050d5..614d286ad8 100644 --- a/library/src/interactor_impl.cxx +++ b/library/src/interactor_impl.cxx @@ -225,7 +225,7 @@ class interactor_impl::internals void IncreaseOpacity(bool negative) { // current opacity, interpreted as 1 if it does not exist - const double currentOpacity = this->Options.model.color.opacity.has_value() ? this->Options.model.color.opacity.value() : 1.0; + const double currentOpacity = this->Options.model.color.opacity.value_or(1.0); // new opacity, clamped between 0 and 1 if not already set outside that range const double increment = negative ? -0.05 : 0.05; From 7fcdd17799be3779a0ee6bebfee1eeaaa1244177 Mon Sep 17 00:00:00 2001 From: unknown <19jrushlow@gmail.com> Date: Fri, 14 Feb 2025 14:01:56 -0500 Subject: [PATCH 04/10] Opacity defaults to unset, minor syntax changes --- library/src/interactor_impl.cxx | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/library/src/interactor_impl.cxx b/library/src/interactor_impl.cxx index 9fb14331a0..fb2fc90cc7 100644 --- a/library/src/interactor_impl.cxx +++ b/library/src/interactor_impl.cxx @@ -963,13 +963,20 @@ interactor& interactor_impl::initBindings() return std::pair(doc, valStream.str()); }; - // "doc", "value (default to 1)" + // "doc", "value/Unset" auto docDblOpt = [](const std::string& doc, const std::optional& val) { std::stringstream valStream; valStream.precision(2); valStream << std::fixed; - valStream << val.value_or(1.0); + if (val.has_value()) + { + valStream << val.value(); + } + else + { + valStream << "Unset"; + } return std::pair(doc, valStream.str()); }; From 0c138e84ccd4aaa06e8005fc9a2cef71fc43c040 Mon Sep 17 00:00:00 2001 From: unknown <19jrushlow@gmail.com> Date: Fri, 14 Feb 2025 17:06:34 -0500 Subject: [PATCH 05/10] Updated baselines for unit tests --- testing/baselines/TestInteractionCheatsheetAnimationName.png | 4 ++-- .../TestInteractionCheatsheetAnimationNameRaytracing.png | 4 ++-- testing/baselines/TestInteractionCheatsheetConfigFile.png | 4 ++-- .../TestInteractionCheatsheetConfigFileRaytracing.png | 4 ++-- testing/baselines/TestInteractionCheatsheetScalars.png | 4 ++-- .../baselines/TestInteractionCheatsheetScalarsRaytracing.png | 4 ++-- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/testing/baselines/TestInteractionCheatsheetAnimationName.png b/testing/baselines/TestInteractionCheatsheetAnimationName.png index c9d7b2a66a..ba129cdbef 100644 --- a/testing/baselines/TestInteractionCheatsheetAnimationName.png +++ b/testing/baselines/TestInteractionCheatsheetAnimationName.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:343a15e8d87300ecb44dc268e539f338f6deb3c8e81a5581373c249a375cb8ca -size 141040 +oid sha256:ac6050207483af12ce8913e446244f64d5b318756562a3d28ddcc07662e5ad36 +size 144574 diff --git a/testing/baselines/TestInteractionCheatsheetAnimationNameRaytracing.png b/testing/baselines/TestInteractionCheatsheetAnimationNameRaytracing.png index 27dac27d41..cf44bebe6d 100644 --- a/testing/baselines/TestInteractionCheatsheetAnimationNameRaytracing.png +++ b/testing/baselines/TestInteractionCheatsheetAnimationNameRaytracing.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:87e56d3bf1120a1d659048ad847985769a9fb732f7eeed7c29dfece230b3d66e -size 144787 +oid sha256:f1b937704b9753f6931ca1d5db928b21311a976d8d0c8e0fda9332454e7ddcb5 +size 146428 diff --git a/testing/baselines/TestInteractionCheatsheetConfigFile.png b/testing/baselines/TestInteractionCheatsheetConfigFile.png index 0a1bee3194..60c50c0506 100644 --- a/testing/baselines/TestInteractionCheatsheetConfigFile.png +++ b/testing/baselines/TestInteractionCheatsheetConfigFile.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:bf1233d87068fd9e99ce57ee288ba5e5983e9b3e0cc9a1658187a8162a64dad8 -size 251199 +oid sha256:2784a964fb229c19e8c264dc784f0ce1d56ec6f1841703d4092fc610c2ca364f +size 258577 diff --git a/testing/baselines/TestInteractionCheatsheetConfigFileRaytracing.png b/testing/baselines/TestInteractionCheatsheetConfigFileRaytracing.png index 7eb9c44606..0f58ccf4e4 100644 --- a/testing/baselines/TestInteractionCheatsheetConfigFileRaytracing.png +++ b/testing/baselines/TestInteractionCheatsheetConfigFileRaytracing.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2c6f2c96dbeffaf9ef0eb20eefb1270159e74504792b6b45848a3995ff637401 -size 258457 +oid sha256:8263abe622e04002fd13ea7f1d7c86121e49086a94a86a1462cf1a99fef193a5 +size 258294 diff --git a/testing/baselines/TestInteractionCheatsheetScalars.png b/testing/baselines/TestInteractionCheatsheetScalars.png index 4ce2f7036b..8a15f80402 100644 --- a/testing/baselines/TestInteractionCheatsheetScalars.png +++ b/testing/baselines/TestInteractionCheatsheetScalars.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b2319a82a3b0df2708b411eb9a6f12a4580babb8d165c634eedd7f2cef62acc3 -size 261001 +oid sha256:a2ecc0e6dfad617a77ed9fb4e5a6604c9d02d209223d1575270027aba5519957 +size 263552 diff --git a/testing/baselines/TestInteractionCheatsheetScalarsRaytracing.png b/testing/baselines/TestInteractionCheatsheetScalarsRaytracing.png index 86ef2fb748..941f6b225f 100644 --- a/testing/baselines/TestInteractionCheatsheetScalarsRaytracing.png +++ b/testing/baselines/TestInteractionCheatsheetScalarsRaytracing.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2f28e6269a9aba7584a4595b045dc1015eb4e121e38415dd5cbfc00db68be15f -size 263588 +oid sha256:fb57020f16a77d2c1678561a20daf90cfdbbe1d424dc2afd590bd0a27381ed0d +size 264696 From ded3da4fd2c3998826444a73e7528a29bd38576d Mon Sep 17 00:00:00 2001 From: unknown <19jrushlow@gmail.com> Date: Sat, 15 Feb 2025 11:00:17 -0500 Subject: [PATCH 06/10] updated unit test to adjust for the new binding --- library/src/interactor_impl.cxx | 2 +- library/testing/TestSDKInteractorCallBack.cxx | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/library/src/interactor_impl.cxx b/library/src/interactor_impl.cxx index fb2fc90cc7..0a1191a2a1 100644 --- a/library/src/interactor_impl.cxx +++ b/library/src/interactor_impl.cxx @@ -219,7 +219,7 @@ class interactor_impl::internals const int newIntensityPct = std::lround(intensity * 100) + (negative ? -offsetPp : +offsetPp); this->Options.render.light.intensity = std::max(newIntensityPct, 0) / 100.0; } - + //---------------------------------------------------------------------------- // Increase/Decrease opacity void IncreaseOpacity(bool negative) diff --git a/library/testing/TestSDKInteractorCallBack.cxx b/library/testing/TestSDKInteractorCallBack.cxx index bac0fab902..98b08cfb14 100644 --- a/library/testing/TestSDKInteractorCallBack.cxx +++ b/library/testing/TestSDKInteractorCallBack.cxx @@ -65,6 +65,7 @@ int TestSDKInteractorCallBack(int argc, char* argv[]) inter.removeBinding({ mod_t::NONE, "B" }); inter.removeBinding({ mod_t::NONE, "S" }); inter.removeBinding({ mod_t::NONE, "Z" }); + inter.removeBinding({ mod_t::CTRL, "P" }); // Check that an binding can be added inter.addBinding({ mod_t::NONE, "S" }, "toggle ui.axis"); From 6c695c879c0d5d8e9e59512f9e89d56ce4557267 Mon Sep 17 00:00:00 2001 From: unknown <19jrushlow@gmail.com> Date: Sat, 15 Feb 2025 14:46:18 -0500 Subject: [PATCH 07/10] updated documentation for keybinds --- doc/user/INTERACTIONS.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/user/INTERACTIONS.md b/doc/user/INTERACTIONS.md index 32c479d09e..bf6c41f4cd 100644 --- a/doc/user/INTERACTIONS.md +++ b/doc/user/INTERACTIONS.md @@ -50,6 +50,9 @@ Other options can be toggled directly by pressing the following hotkeys: - J: the display of the HDRI skybox. - L: increase lights intensity. - Shift+L: decrease lights intensity. +- Ctrl+P: increase opacity. +- Shift+P: decrease opacity. +- Shift+A: toggle armature. Note that the raytracing hotkeys are only available if F3D is build with raytracing enabled. From 364b66a79c6eb4bac0254fdd92ce603bd214f4c9 Mon Sep 17 00:00:00 2001 From: unknown <19jrushlow@gmail.com> Date: Sun, 16 Feb 2025 00:37:36 -0500 Subject: [PATCH 08/10] updated COMMANDS.md to contain opacity commands --- doc/user/COMMANDS.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/doc/user/COMMANDS.md b/doc/user/COMMANDS.md index c9d72472fd..3b08200e9a 100644 --- a/doc/user/COMMANDS.md +++ b/doc/user/COMMANDS.md @@ -36,6 +36,10 @@ eg: `roll_camera 120`. `decrease_light_intensity`: A specific command to decrease light intensity. No argument. +`increase_opacity`: A specific command to increase opacity. Unset opacity will be treated as if it has a value of 1. No argument. + +`decrease_opacity`: A specific command to decrease opacity. Unset opacity will be treated as if it has a value of 1. No argument. + `print_scene_info`: A specific command to print information about the scene, No argument. `print_coloring_info`: A specific command to print information about coloring settings, No argument. From 4ec70d89fbcd9ea8779533d12ee81db3748e7656 Mon Sep 17 00:00:00 2001 From: unknown <19jrushlow@gmail.com> Date: Sun, 16 Feb 2025 11:38:57 -0500 Subject: [PATCH 09/10] added interaction test for opacity binding --- application/testing/CMakeLists.txt | 1 + testing/baselines/TestInteractionOpacity.png | 3 + testing/recordings/TestInteractionOpacity.log | 151 ++++++++++++++++++ 3 files changed, 155 insertions(+) create mode 100644 testing/baselines/TestInteractionOpacity.png create mode 100644 testing/recordings/TestInteractionOpacity.log diff --git a/application/testing/CMakeLists.txt b/application/testing/CMakeLists.txt index cbd7d0cc68..d8839421d5 100644 --- a/application/testing/CMakeLists.txt +++ b/application/testing/CMakeLists.txt @@ -828,6 +828,7 @@ f3d_test(NAME TestInteractionFocalPointPickingShift DATA dragon.vtu INTERACTION f3d_test(NAME TestInteractionFocalPointPickingPoints DATA pointsCloud.vtp INTERACTION THRESHOLD 0.05) # Threshold needed because sometime a point does not appear f3d_test(NAME TestInteractionLightIntensity DATA dragon.vtu INTERACTION LONG_TIMEOUT) f3d_test(NAME TestInteractionMultiFileColoring DATA mb/recursive ARGS --multi-file-mode=all INTERACTION) #SSSB +f3d_test(NAME TestInteractionOpacity DATA dragon.vtu INTERACTION) f3d_test(NAME TestInteractionReload DATA dragon.vtu ARGS -e INTERACTION) #Up; f3d_test(NAME TestInteractionLoadParentDirectory DATA multi/dragon.vtu ARGS --filename INTERACTION UI) #Down; f3d_test(NAME TestInteractionEmptyLoadParentDirectory INTERACTION NO_BASELINE REGEXP "No files loaded, no rendering performed") #Down; diff --git a/testing/baselines/TestInteractionOpacity.png b/testing/baselines/TestInteractionOpacity.png new file mode 100644 index 0000000000..0a158eb7e8 --- /dev/null +++ b/testing/baselines/TestInteractionOpacity.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:280c89814576829a82b298656ab6f5f5a38554219e4a617c4ea683589d6a159a +size 20790 diff --git a/testing/recordings/TestInteractionOpacity.log b/testing/recordings/TestInteractionOpacity.log new file mode 100644 index 0000000000..2033bd0d7a --- /dev/null +++ b/testing/recordings/TestInteractionOpacity.log @@ -0,0 +1,151 @@ +# StreamVersion 1.2 +RenderEvent 0 0 0 0 0 0 0 +KeyPressEvent 0 0 1 0 1 Shift_L 0 +KeyPressEvent 0 0 1 80 1 P 0 +CharEvent 0 0 1 80 1 P 0 +KeyReleaseEvent 0 0 1 80 1 P 0 +KeyPressEvent 0 0 1 80 1 P 0 +CharEvent 0 0 1 80 1 P 0 +KeyReleaseEvent 0 0 1 80 1 P 0 +KeyPressEvent 0 0 1 80 1 P 0 +CharEvent 0 0 1 80 1 P 0 +KeyReleaseEvent 0 0 1 80 1 P 0 +KeyPressEvent 0 0 1 80 1 P 0 +CharEvent 0 0 1 80 1 P 0 +KeyReleaseEvent 0 0 1 80 1 P 0 +KeyPressEvent 0 0 1 80 1 P 0 +CharEvent 0 0 1 80 1 P 0 +KeyReleaseEvent 0 0 1 80 1 P 0 +KeyPressEvent 0 0 1 80 1 P 0 +CharEvent 0 0 1 80 1 P 0 +KeyReleaseEvent 0 0 1 80 1 P 0 +KeyPressEvent 0 0 1 80 1 P 0 +CharEvent 0 0 1 80 1 P 0 +KeyReleaseEvent 0 0 1 80 1 P 0 +KeyPressEvent 0 0 1 80 1 P 0 +CharEvent 0 0 1 80 1 P 0 +KeyReleaseEvent 0 0 1 80 1 P 0 +KeyPressEvent 0 0 1 80 1 P 0 +CharEvent 0 0 1 80 1 P 0 +KeyReleaseEvent 0 0 1 80 1 P 0 +KeyPressEvent 0 0 1 80 1 P 0 +CharEvent 0 0 1 80 1 P 0 +KeyReleaseEvent 0 0 1 80 1 P 0 +KeyPressEvent 0 0 1 80 1 P 0 +CharEvent 0 0 1 80 1 P 0 +KeyReleaseEvent 0 0 1 80 1 P 0 +KeyPressEvent 0 0 1 80 1 P 0 +CharEvent 0 0 1 80 1 P 0 +KeyReleaseEvent 0 0 1 80 1 P 0 +KeyPressEvent 0 0 1 80 1 P 0 +CharEvent 0 0 1 80 1 P 0 +KeyReleaseEvent 0 0 1 80 1 P 0 +KeyPressEvent 0 0 1 80 1 P 0 +CharEvent 0 0 1 80 1 P 0 +KeyReleaseEvent 0 0 1 80 1 P 0 +KeyPressEvent 0 0 1 80 1 P 0 +CharEvent 0 0 1 80 1 P 0 +KeyReleaseEvent 0 0 1 80 1 P 0 +KeyPressEvent 0 0 1 80 1 P 0 +CharEvent 0 0 1 80 1 P 0 +KeyReleaseEvent 0 0 1 80 1 P 0 +KeyPressEvent 0 0 1 80 1 P 0 +CharEvent 0 0 1 80 1 P 0 +KeyReleaseEvent 0 0 1 80 1 P 0 +KeyPressEvent 0 0 1 80 1 P 0 +CharEvent 0 0 1 80 1 P 0 +KeyReleaseEvent 0 0 1 80 1 P 0 +KeyPressEvent 0 0 1 80 1 P 0 +CharEvent 0 0 1 80 1 P 0 +KeyReleaseEvent 0 0 1 80 1 P 0 +KeyPressEvent 0 0 1 80 1 P 0 +CharEvent 0 0 1 80 1 P 0 +KeyReleaseEvent 0 0 1 80 1 P 0 +KeyPressEvent 0 0 1 80 1 P 0 +CharEvent 0 0 1 80 1 P 0 +KeyReleaseEvent 0 0 1 80 1 P 0 +KeyPressEvent 0 0 1 80 1 P 0 +CharEvent 0 0 1 80 1 P 0 +KeyReleaseEvent 0 0 1 80 1 P 0 +KeyPressEvent 0 0 1 80 1 P 0 +CharEvent 0 0 1 80 1 P 0 +KeyReleaseEvent 0 0 1 80 1 P 0 +KeyPressEvent 0 0 1 80 1 P 0 +CharEvent 0 0 1 80 1 P 0 +KeyReleaseEvent 0 0 1 80 1 P 0 +KeyPressEvent 0 0 1 80 1 P 0 +CharEvent 0 0 1 80 1 P 0 +KeyReleaseEvent 0 0 1 80 1 P 0 +KeyPressEvent 0 0 1 80 1 P 0 +CharEvent 0 0 1 80 1 P 0 +KeyReleaseEvent 0 0 1 80 1 P 0 +KeyPressEvent 0 0 1 80 1 P 0 +CharEvent 0 0 1 80 1 P 0 +KeyReleaseEvent 0 0 1 80 1 P 0 +KeyPressEvent 0 0 1 80 1 P 0 +CharEvent 0 0 1 80 1 P 0 +KeyReleaseEvent 0 0 1 80 1 P 0 +KeyPressEvent 0 0 1 80 1 P 0 +CharEvent 0 0 1 80 1 P 0 +KeyReleaseEvent 0 0 1 80 1 P 0 +KeyPressEvent 0 0 1 80 1 P 0 +CharEvent 0 0 1 80 1 P 0 +KeyReleaseEvent 0 0 1 80 1 P 0 +KeyPressEvent 0 0 1 80 1 P 0 +CharEvent 0 0 1 80 1 P 0 +KeyReleaseEvent 0 0 1 80 1 P 0 +KeyPressEvent 0 0 1 80 1 P 0 +CharEvent 0 0 1 80 1 P 0 +KeyReleaseEvent 0 0 1 80 1 P 0 +KeyPressEvent 0 0 1 80 1 P 0 +CharEvent 0 0 1 80 1 P 0 +KeyReleaseEvent 0 0 1 80 1 P 0 +KeyPressEvent 0 0 1 80 1 P 0 +CharEvent 0 0 1 80 1 P 0 +KeyReleaseEvent 0 0 1 80 1 P 0 +KeyPressEvent 0 0 1 80 1 P 0 +CharEvent 0 0 1 80 1 P 0 +KeyReleaseEvent 0 0 1 80 1 P 0 +KeyPressEvent 0 0 1 80 1 P 0 +CharEvent 0 0 1 80 1 P 0 +KeyReleaseEvent 0 0 1 80 1 P 0 +KeyPressEvent 0 0 1 80 1 P 0 +CharEvent 0 0 1 80 1 P 0 +KeyReleaseEvent 0 0 1 80 1 P 0 +KeyPressEvent 0 0 1 80 1 P 0 +CharEvent 0 0 1 80 1 P 0 +KeyReleaseEvent 0 0 1 80 1 P 0 +KeyPressEvent 0 0 1 80 1 P 0 +CharEvent 0 0 1 80 1 P 0 +KeyReleaseEvent 0 0 1 80 1 P 0 +KeyPressEvent 0 0 1 80 1 P 0 +CharEvent 0 0 1 80 1 P 0 +KeyReleaseEvent 0 0 1 80 1 P 0 +KeyPressEvent 0 0 1 80 1 P 0 +CharEvent 0 0 1 80 1 P 0 +KeyReleaseEvent 0 0 1 80 1 P 0 +KeyPressEvent 0 0 1 80 1 P 0 +CharEvent 0 0 1 80 1 P 0 +KeyReleaseEvent 0 0 1 80 1 P 0 +KeyReleaseEvent 0 0 0 0 1 Shift_L 0 +KeyPressEvent 0 0 2 0 1 Control_L 0 +KeyPressEvent 0 0 2 16 1 p 0 +CharEvent 0 0 2 16 1 p 0 +KeyReleaseEvent 0 0 2 16 1 p 0 +KeyPressEvent 0 0 2 16 1 p 0 +CharEvent 0 0 2 16 1 p 0 +KeyReleaseEvent 0 0 2 16 1 p 0 +KeyPressEvent 0 0 2 16 1 p 0 +CharEvent 0 0 2 16 1 p 0 +KeyReleaseEvent 0 0 2 16 1 p 0 +KeyPressEvent 0 0 2 16 1 p 0 +CharEvent 0 0 2 16 1 p 0 +KeyReleaseEvent 0 0 2 16 1 p 0 +KeyPressEvent 0 0 2 16 1 p 0 +CharEvent 0 0 2 16 1 p 0 +KeyReleaseEvent 0 0 2 16 1 p 0 +KeyPressEvent 0 0 2 16 1 p 0 +CharEvent 0 0 2 16 1 p 0 +KeyReleaseEvent 0 0 2 16 1 p 0 +KeyReleaseEvent 0 0 0 0 1 Control_L 0 + From 4db13a4cb813651903cb6667c7d0f20acd1e483d Mon Sep 17 00:00:00 2001 From: unknown <19jrushlow@gmail.com> Date: Sun, 16 Feb 2025 12:57:55 -0500 Subject: [PATCH 10/10] added unit test for opacity cheatsheet to cover docDblOpt --- application/testing/CMakeLists.txt | 1 + testing/baselines/TestInteractionCheatsheetOpacity.png | 3 +++ testing/recordings/TestInteractionCheatsheetOpacity.log | 6 ++++++ 3 files changed, 10 insertions(+) create mode 100644 testing/baselines/TestInteractionCheatsheetOpacity.png create mode 100644 testing/recordings/TestInteractionCheatsheetOpacity.log diff --git a/application/testing/CMakeLists.txt b/application/testing/CMakeLists.txt index d8839421d5..ea6f7c60e1 100644 --- a/application/testing/CMakeLists.txt +++ b/application/testing/CMakeLists.txt @@ -450,6 +450,7 @@ else() f3d_test(NAME TestInteractionCheatsheetNoFile INTERACTION UI NO_DATA_FORCE_RENDER) #HXM f3d_test(NAME TestInteractionCheatsheetAnimationName DATA InterpolationTest.glb ARGS --animation-index=6 RESOLUTION 800,800 INTERACTION UI) #HWWW f3d_test(NAME TestInteractionCheatsheetConfigFile DATA dragon.vtu CONFIG ${F3D_SOURCE_DIR}/testing/configs/bindings.json RESOLUTION 600,1300 INTERACTION UI) #H + f3d_test(NAME TestInteractionCheatsheetOpacity DATA cow.vtp INTERACTION UI ARGS --opacity=0.5 RESOLUTION 300,620) endif() f3d_test(NAME TestCameraPersp DATA Cameras.gltf ARGS --camera-index=0) diff --git a/testing/baselines/TestInteractionCheatsheetOpacity.png b/testing/baselines/TestInteractionCheatsheetOpacity.png new file mode 100644 index 0000000000..075e4aaff1 --- /dev/null +++ b/testing/baselines/TestInteractionCheatsheetOpacity.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9eec1e99e56f888e1bfe8ae8ffaf062dcf4929e914a8014320d95ed81e9f8665 +size 84598 diff --git a/testing/recordings/TestInteractionCheatsheetOpacity.log b/testing/recordings/TestInteractionCheatsheetOpacity.log new file mode 100644 index 0000000000..661ec0f3fb --- /dev/null +++ b/testing/recordings/TestInteractionCheatsheetOpacity.log @@ -0,0 +1,6 @@ +# StreamVersion 1.1 +ExposeEvent 0 599 0 0 0 0 +RenderEvent 0 599 0 0 0 0 +KeyPressEvent 738 539 0 104 1 h +CharEvent 738 539 0 104 1 h +KeyReleaseEvent 738 539 0 104 1 h