ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
RenderOptionWithEditing.cpp
Go to the documentation of this file.
1 // ----------------------------------------------------------------------------
2 // - CloudViewer: www.cloudViewer.org -
3 // ----------------------------------------------------------------------------
4 // Copyright (c) 2018-2024 www.cloudViewer.org
5 // SPDX-License-Identifier: MIT
6 // ----------------------------------------------------------------------------
7 
9 
10 #include <Logging.h>
11 #include <json/json.h>
12 
13 namespace cloudViewer {
14 namespace visualization {
15 
19 
20 bool RenderOptionWithEditing::ConvertToJsonValue(Json::Value &value) const {
22  return false;
23  }
25  value["selection_polygon_boundary_color"])) {
26  return false;
27  }
29  value["selection_polygon_mask_color"])) {
30  return false;
31  }
32  value["selection_polygon_mask_alpha"] = selection_polygon_mask_alpha_;
33  value["pointcloud_picker_sphere_size"] = pointcloud_picker_sphere_size_;
34  return true;
35 }
36 
37 bool RenderOptionWithEditing::ConvertFromJsonValue(const Json::Value &value) {
39  return false;
40  }
43  value["selection_polygon_boundary_color"])) {
44  return false;
45  }
47  value["selection_polygon_mask_color"])) {
48  return false;
49  }
50  selection_polygon_mask_alpha_ = value.get("selection_polygon_mask_alpha",
52  .asDouble();
53  pointcloud_picker_sphere_size_ = value.get("pointcloud_picker_sphere_size",
55  .asDouble();
56  return true;
57 }
58 
59 } // namespace visualization
60 } // namespace cloudViewer
static bool EigenVector3dFromJsonArray(Eigen::Vector3d &vec, const Json::Value &value)
static bool EigenVector3dToJsonArray(const Eigen::Vector3d &vec, Json::Value &value)
bool ConvertToJsonValue(Json::Value &value) const override
bool ConvertFromJsonValue(const Json::Value &value) override
bool ConvertToJsonValue(Json::Value &value) const override
bool ConvertFromJsonValue(const Json::Value &value) override
Generic file read and write utility for python interface.