Open3D (C++ API)  0.18.0+5c982c7
PointCloudPicker.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 
10 #include <Eigen/Core>
11 #include <memory>
12 #include <vector>
13 
15 
16 namespace open3d {
17 
18 namespace geometry {
19 class PointCloud;
20 }
21 namespace visualization {
22 
25 public:
27  : geometry::Geometry3D(geometry::Geometry::GeometryType::Unspecified) {}
28  ~PointCloudPicker() override {}
29 
30 public:
31  PointCloudPicker& Clear() override;
32  bool IsEmpty() const override;
33  Eigen::Vector3d GetMinBound() const final;
34  Eigen::Vector3d GetMaxBound() const final;
35  Eigen::Vector3d GetCenter() const final;
36 
41  geometry::AxisAlignedBoundingBox GetAxisAlignedBoundingBox() const final;
42 
51  bool robust = false) const final;
52 
61  bool robust = false) const final;
62 
63  PointCloudPicker& Transform(const Eigen::Matrix4d& transformation) override;
64  PointCloudPicker& Translate(const Eigen::Vector3d& translation,
65  bool relative = true) override;
66  PointCloudPicker& Scale(const double scale,
67  const Eigen::Vector3d& center) override;
68  PointCloudPicker& Rotate(const Eigen::Matrix3d& R,
69  const Eigen::Vector3d& center) override;
70  bool SetPointCloud(std::shared_ptr<const geometry::Geometry> ptr);
71 
72 public:
73  std::shared_ptr<const geometry::Geometry> pointcloud_ptr_;
74  std::vector<size_t> picked_indices_;
75 };
76 
77 } // namespace visualization
78 } // 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
The base geometry class for 3D geometries.
Definition: Geometry3D.h:28
The base geometry class.
Definition: Geometry.h:18
GeometryType
Specifies possible geometry types.
Definition: Geometry.h:23
A bounding box oriented along an arbitrary frame of reference.
Definition: BoundingVolume.h:25
A utility class to store picked points of a pointcloud.
Definition: PointCloudPicker.h:24
bool SetPointCloud(std::shared_ptr< const geometry::Geometry > ptr)
Definition: PointCloudPicker.cpp:106
geometry::OrientedBoundingBox GetMinimalOrientedBoundingBox(bool robust=false) const final
Definition: PointCloudPicker.cpp:71
Eigen::Vector3d GetCenter() const final
Returns the center of the geometry coordinates.
Definition: PointCloudPicker.cpp:42
Eigen::Vector3d GetMaxBound() const final
Returns max bounds for geometry coordinates.
Definition: PointCloudPicker.cpp:34
PointCloudPicker & Translate(const Eigen::Vector3d &translation, bool relative=true) override
Apply translation to the geometry coordinates.
Definition: PointCloudPicker.cpp:88
std::shared_ptr< const geometry::Geometry > pointcloud_ptr_
Definition: PointCloudPicker.h:73
~PointCloudPicker() override
Definition: PointCloudPicker.h:28
geometry::AxisAlignedBoundingBox GetAxisAlignedBoundingBox() const final
Definition: PointCloudPicker.cpp:50
geometry::OrientedBoundingBox GetOrientedBoundingBox(bool robust=false) const final
Definition: PointCloudPicker.cpp:60
PointCloudPicker()
Definition: PointCloudPicker.h:26
PointCloudPicker & Scale(const double scale, const Eigen::Vector3d &center) override
Apply scaling to the geometry coordinates. Given a scaling factor , and center , a given point is tr...
Definition: PointCloudPicker.cpp:94
PointCloudPicker & Transform(const Eigen::Matrix4d &transformation) override
Apply transformation (4x4 matrix) to the geometry coordinates.
Definition: PointCloudPicker.cpp:82
bool IsEmpty() const override
Returns true iff the geometry is empty.
Definition: PointCloudPicker.cpp:22
std::vector< size_t > picked_indices_
Definition: PointCloudPicker.h:74
PointCloudPicker & Clear() override
Clear all elements in the geometry.
Definition: PointCloudPicker.cpp:17
PointCloudPicker & Rotate(const Eigen::Matrix3d &R, const Eigen::Vector3d &center) override
Apply rotation to the geometry coordinates and normals. Given a rotation matrix , and center ,...
Definition: PointCloudPicker.cpp:100
Eigen::Vector3d GetMinBound() const final
Returns min bounds for geometry coordinates.
Definition: PointCloudPicker.cpp:26
Definition: NonRigidOptimizer.cpp:22
Definition: PinholeCameraIntrinsic.cpp:16
Definition: Device.h:107