ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
RotationInteractorLogic.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 
11 
12 namespace cloudViewer {
13 namespace visualization {
14 namespace rendering {
15 
18 
19 public:
20  explicit RotationInteractorLogic(Camera *camera, double min_far_plane);
22 
23  virtual void SetCenterOfRotation(const Eigen::Vector3f &center);
24 
25  // Panning is always relative to the camera's left (x) and up (y)
26  // axis. Modifies center of rotation and the matrix.
27  virtual void Pan(int dx, int dy);
28 
29  virtual void StartMouseDrag();
30  virtual void UpdateMouseDragUI();
31  virtual void EndMouseDrag();
32 
33 protected:
36 
37  Eigen::Vector3f CalcPanVectorWorld(int dx, int dy);
38  void UpdateCameraFarPlane();
39 };
40 
41 } // namespace rendering
42 } // namespace visualization
43 } // namespace cloudViewer
Generic file read and write utility for python interface.