Open3D (C++ API)  0.18.0+3975044
GuiSettingsView.h
Go to the documentation of this file.
1 // ----------------------------------------------------------------------------
2 // - Open3D: www.open3d.org -
3 // ----------------------------------------------------------------------------
4 // Copyright (c) 2018-2023 www.open3d.org
5 // SPDX-License-Identifier: MIT
6 // ----------------------------------------------------------------------------
7 
8 #pragma once
9 
10 #include <functional>
11 #include <memory>
12 #include <string>
13 
15 
16 namespace open3d {
17 
18 namespace visualization {
19 
20 namespace gui {
21 class Button;
22 class Checkbox;
23 class Combobox;
24 class ColorEdit;
25 class CollapsableVert;
26 class Slider;
27 class VectorEdit;
28 } // namespace gui
29 
30 class GuiSettingsModel;
31 
32 class GuiSettingsView : public gui::Vert {
33 public:
35  const gui::Theme& theme,
36  const std::string& resource_path,
37  std::function<void(const char*)> on_load_ibl);
38 
39  void ShowFileMaterialEntry(bool show);
40  void EnableEstimateNormals(bool enable);
41  void Update();
42 
43 private:
44  GuiSettingsModel& model_;
45  std::function<void(const char*)> on_load_ibl_;
46 
47  std::shared_ptr<gui::Combobox> lighting_profile_;
48  std::shared_ptr<gui::Checkbox> show_axes_;
49  std::shared_ptr<gui::Checkbox> show_ground_;
50  std::shared_ptr<gui::ColorEdit> bg_color_;
51  std::shared_ptr<gui::Checkbox> show_skybox_;
52 
53  std::shared_ptr<gui::CollapsableVert> advanced_;
54  std::shared_ptr<gui::Checkbox> ibl_enabled_;
55  std::shared_ptr<gui::Checkbox> sun_enabled_;
56  std::shared_ptr<gui::Combobox> ibls_;
57  std::shared_ptr<gui::Slider> ibl_intensity_;
58  std::shared_ptr<gui::Slider> sun_intensity_;
59  std::shared_ptr<gui::VectorEdit> sun_dir_;
60  std::shared_ptr<gui::Checkbox> sun_follows_camera_;
61  std::shared_ptr<gui::ColorEdit> sun_color_;
62 
63  std::shared_ptr<gui::Combobox> material_type_;
64  std::shared_ptr<gui::Combobox> prefab_material_;
65  std::shared_ptr<gui::ColorEdit> material_color_;
66  std::shared_ptr<gui::Button> reset_material_color_;
67  std::shared_ptr<gui::Slider> point_size_;
68  std::shared_ptr<gui::Button> generate_normals_;
69  std::shared_ptr<gui::Checkbox> basic_mode_;
70  std::shared_ptr<gui::Checkbox> wireframe_mode_;
71 
72  bool sun_follows_cam_was_on_ = true;
73  void UpdateUIForBasicMode(bool enable);
74 };
75 
76 } // namespace visualization
77 } // namespace open3d
const Theme * theme
Definition: Window.cpp:74
Definition: GuiSettingsModel.h:17
Definition: GuiSettingsView.h:32
void EnableEstimateNormals(bool enable)
Definition: GuiSettingsView.cpp:342
void Update()
Definition: GuiSettingsView.cpp:346
void ShowFileMaterialEntry(bool show)
Definition: GuiSettingsView.cpp:324
GuiSettingsView(GuiSettingsModel &model, const gui::Theme &theme, const std::string &resource_path, std::function< void(const char *)> on_load_ibl)
Definition: GuiSettingsView.cpp:39
Lays out widgets vertically.
Definition: Layout.h:113
const char const char value recording_handle imu_sample void
Definition: K4aPlugin.cpp:250
Definition: PinholeCameraIntrinsic.cpp:16
Definition: Theme.h:20