Open3D (C++ API)  0.19.0
Loading...
Searching...
No Matches
GuiSettingsModel.h
Go to the documentation of this file.
1// ----------------------------------------------------------------------------
2// - Open3D: www.open3d.org -
3// ----------------------------------------------------------------------------
4// Copyright (c) 2018-2024 www.open3d.org
5// SPDX-License-Identifier: MIT
6// ----------------------------------------------------------------------------
7
8#pragma once
9
10#include <map>
11
13
14namespace open3d {
15namespace visualization {
16
18public:
19 static constexpr const char* DEFAULT_IBL = "default";
20 static constexpr const char* CUSTOM_IBL = "Custom KTX file...";
21 static constexpr const char* DEFAULT_MATERIAL_NAME = "Polished ceramic";
22 static constexpr const char* MATERIAL_FROM_FILE_NAME =
23 "Material from file [default]";
24 static constexpr const char* POINT_CLOUD_PROFILE_NAME =
25 "Cloudy day (no direct sun)";
26
28 std::string name;
31 Eigen::Vector3f sun_dir;
32 Eigen::Vector3f sun_color = {1.0f, 1.0f, 1.0f};
34 rendering::Scene::Transform::Identity();
35 bool ibl_enabled = true;
36 bool use_default_ibl = false;
37 bool sun_enabled = true;
38 };
39
46
47 struct LitMaterial {
48 Eigen::Vector3f base_color = {0.9f, 0.9f, 0.9f};
49 float metallic = 0.f;
50 float roughness = 0.7f;
51 float reflectance = 0.5f;
52 float clear_coat = 0.2f;
54 float anisotropy = 0.f;
55 };
56
58 // The base color should NOT be {1, 1, 1}, because then the
59 // model will be invisible against the default white background.
60 Eigen::Vector3f base_color = {0.9f, 0.9f, 0.9f};
61 };
62
63 struct Materials {
66 float point_size = 3.0f;
67 // 'name' is only used to keep the UI in sync. It is set by
68 // Set...Material[s]() and should not be set manually.
69 std::string lit_name;
70 };
71
72 static const std::vector<LightingProfile> lighting_profiles_;
73 static const std::map<std::string, const LitMaterial> prefab_materials_;
76 static const LitMaterial&