Open3D (C++ API)  0.18.0+252c867
RotationInteractorLogic.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 
11 
12 namespace open3d {
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 open3d
Definition: MatrixInteractorLogic.h:20
Definition: RotationInteractorLogic.h:16
void UpdateCameraFarPlane()
Definition: RotationInteractorLogic.cpp:77
virtual void SetCenterOfRotation(const Eigen::Vector3f &center)
Definition: RotationInteractorLogic.cpp:20
RotationInteractorLogic(Camera *camera, double min_far_plane)
Definition: RotationInteractorLogic.cpp:14
Eigen::Vector3f CalcPanVectorWorld(int dx, int dy)
Definition: RotationInteractorLogic.cpp:40
~RotationInteractorLogic()
Definition: RotationInteractorLogic.cpp:18
Camera * camera_
Definition: RotationInteractorLogic.h:35
virtual void UpdateMouseDragUI()
Definition: RotationInteractorLogic.cpp:73
virtual void Pan(int dx, int dy)
Definition: RotationInteractorLogic.cpp:25
double min_far_plane_
Definition: RotationInteractorLogic.h:34
virtual void StartMouseDrag()
Definition: RotationInteractorLogic.cpp:69
virtual void EndMouseDrag()
Definition: RotationInteractorLogic.cpp:75
Definition: PinholeCameraIntrinsic.cpp:16