Open3D (C++ API)  0.17.0
Loading...
Searching...
No Matches
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
16namespace open3d {
17
18namespace visualization {
19
20namespace gui {
21class Button;
22class Checkbox;
23class Combobox;
24class ColorEdit;
25class CollapsableVert;
26class Slider;
27class VectorEdit;
28} // namespace gui
29
30class GuiSettingsModel;
31
32class GuiSettingsView : public gui::Vert {
33public:
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
43private:
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
Lays out widgets vertically.
Definition Layout.h:111
Definition PinholeCameraIntrinsic.cpp:16