Open3D (C++ API)  0.18.0+90810a3
CameraInteractorLogic.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  CameraInteractorLogic(Camera* c, double min_far_plane);
21 
22  void SetBoundingBox(
23  const geometry::AxisAlignedBoundingBox& bounds) override;
24 
25  void Rotate(int dx, int dy) override;
26  void RotateZ(int dx, int dy) override;
27  void Dolly(float dy, DragType type) override;
28  void Dolly(float z_dist, Camera::Transform matrix_in) override;
29 
30  void Pan(int dx, int dy) override;
31 
33  void Zoom(int dy, DragType drag_type);
34 
35  void RotateLocal(float angle_rad, const Eigen::Vector3f& axis);
36  void MoveLocal(const Eigen::Vector3f& v);
37 
38  void RotateFly(int dx, int dy);
39 
40  void StartMouseDrag() override;
41  void ResetMouseDrag();
42  void UpdateMouseDragUI() override;
43  void EndMouseDrag() override;
44 
45 private:
46  double fov_at_mouse_down_;
47 };
48 
49 } // namespace rendering
50 } // namespace visualization
51 } // namespace open3d
A bounding box that is aligned along the coordinate axes and defined by the min_bound and max_bound.
Definition: BoundingVolume.h:160
Eigen::Transform< float, 3, Eigen::Affine > Transform
Definition: Camera.h:25
Definition: CameraInteractorLogic.h:16
void Rotate(int dx, int dy) override
Definition: CameraInteractorLogic.cpp:26
void ResetMouseDrag()
Definition: CameraInteractorLogic.cpp:140
void StartMouseDrag() override
Definition: CameraInteractorLogic.cpp:135
void UpdateMouseDragUI() override
Definition: CameraInteractorLogic.cpp:142
void EndMouseDrag() override
Definition: CameraInteractorLogic.cpp:144
void Zoom(int dy, DragType drag_type)
Sets camera field of view.
Definition: CameraInteractorLogic.cpp:79
CameraInteractorLogic(Camera *c, double min_far_plane)
Definition: CameraInteractorLogic.cpp:14
void MoveLocal(const Eigen::Vector3f &v)
Definition: CameraInteractorLogic.cpp:73
void RotateLocal(float angle_rad, const Eigen::Vector3f &axis)
Definition: CameraInteractorLogic.cpp:66
void Dolly(float dy, DragType type) override
Definition: CameraInteractorLogic.cpp:45
void RotateZ(int dx, int dy) override
Rotates about the forward axis of the matrix.
Definition: CameraInteractorLogic.cpp:31
void RotateFly(int dx, int dy)
Definition: CameraInteractorLogic.cpp:36
void SetBoundingBox(const geometry::AxisAlignedBoundingBox &bounds) override
Definition: CameraInteractorLogic.cpp:17
void Pan(int dx, int dy) override
Definition: CameraInteractorLogic.cpp:61
DragType
Definition: MatrixInteractorLogic.h:56
Definition: RotationInteractorLogic.h:16
RotationInteractorLogic(Camera *camera, double min_far_plane)
Definition: RotationInteractorLogic.cpp:14
char type
Definition: FilePCD.cpp:41
Definition: PinholeCameraIntrinsic.cpp:16