Open3D (C++ API)  0.18.0
VectorEdit.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 <Eigen/Geometry>
11 
13 
14 namespace open3d {
15 namespace visualization {
16 namespace gui {
17 
18 class VectorEdit : public Widget {
19  using Super = Widget;
20 
21 public:
22  VectorEdit();
23  ~VectorEdit();
24 
25  Eigen::Vector3f GetValue() const;
27  void SetValue(const Eigen::Vector3f& val);
28 
31  void SetOnValueChanged(
32  std::function<void(const Eigen::Vector3f&)> on_changed);
33 
35  const Constraints& constraints) const override;
36  Widget::DrawResult Draw(const DrawContext& context) override;
37 
38 private:
39  struct Impl;
40  std::unique_ptr<Impl> impl_;
41 };
42 
43 } // namespace gui
44 } // namespace visualization
45 } // namespace open3d
ImGuiContext * context
Definition: Window.cpp:76
Definition: VectorEdit.h:18
Widget::DrawResult Draw(const DrawContext &context) override
Definition: VectorEdit.cpp:58
void SetOnValueChanged(std::function< void(const Eigen::Vector3f &)> on_changed)
Definition: VectorEdit.cpp:46
Size CalcPreferredSize(const LayoutContext &context, const Constraints &constraints) const override
Definition: VectorEdit.cpp:51
void SetValue(const Eigen::Vector3f &val)
Sets the value of the widget. Does not call onValueChanged.
Definition: VectorEdit.cpp:38
Eigen::Vector3f GetValue() const
Definition: VectorEdit.cpp:36
~VectorEdit()
Definition: VectorEdit.cpp:34
VectorEdit()
Definition: VectorEdit.cpp:30
Definition: Widget.h:49
Widget()
Definition: Widget.cpp:34
DrawResult
Definition: Widget.h:95
Definition: PinholeCameraIntrinsic.cpp:16