ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
LightDirectionInteractorLogic.h
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 
8 #pragma once
9 
12 
13 namespace cloudViewer {
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 cloudViewer
std::string name
Eigen::Transform< float, 3, Eigen::Affine > Transform
Definition: Camera.h:29
Generic file read and write utility for python interface.