Open3D (C++ API)  0.17.0
LightDirectionInteractorLogic.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 
12 
13 namespace open3d {
14 namespace visualization {
15 namespace rendering {
16 
17 class Camera;
18 class Scene;
19 
22 
23 public:
25 
26  void Rotate(int dx, int dy) override;
27 
28  void StartMouseDrag();
29  void UpdateMouseDragUI();
30  void EndMouseDrag();
31 
32  Eigen::Vector3f GetCurrentDirection() const;
33 
34 private:
35  Scene* scene_;
36  Camera* camera_;
37  LightHandle dir_light_;
38  Eigen::Vector3f light_dir_at_mouse_down_;
39 
40  struct UIObj {
41  std::string name;
42  Camera::Transform transform;
43  };
44  std::vector<UIObj> ui_objs_;
45 
46  void ClearUI();
47 };
48 
49 } // namespace rendering
50 } // namespace visualization
51 } // namespace open3d
Eigen::Transform< float, 3, Eigen::Affine > Transform
Definition: Camera.h:25
Definition: LightDirectionInteractorLogic.h:20
void StartMouseDrag()
Definition: LightDirectionInteractorLogic.cpp:114
Eigen::Vector3f GetCurrentDirection() const
Definition: LightDirectionInteractorLogic.cpp:190
LightDirectionInteractorLogic(Scene *scene, Camera *camera)
Definition: LightDirectionInteractorLogic.cpp:103
void UpdateMouseDragUI()
Definition: LightDirectionInteractorLogic.cpp:172
void EndMouseDrag()
Definition: LightDirectionInteractorLogic.cpp:181
void Rotate(int dx, int dy) override
Definition: LightDirectionInteractorLogic.cpp:107
Definition: MatrixInteractorLogic.h:20
std::string name
Definition: FilePCD.cpp:39
Definition: PinholeCameraIntrinsic.cpp:16