COGS
Computer Graphics Structures library
PointCloudSelector.h
1 /*
2  Copyright (C) Skeletex Research, s.r.o. - All Rights Reserved
3  Unauthorized copying of this file, via any medium is strictly prohibited
4  Proprietary and confidential
5 */
6 #ifndef COGS_POINT_CLOUD_SELECTOR_H
7 #define COGS_POINT_CLOUD_SELECTOR_H
8 
9 #include <COGS/Octree.h>
10 #include <COGS/PointCloud.h>
11 
12 namespace cogs
13 {
15  class COGS_API PointCloudSelector
16  {
17  public:
19  PointCloudSelector() = default;
26  PointCloudSelector(std::shared_ptr<cogs::PointCloud> pointcloud);
33  void Initialize(std::shared_ptr<cogs::PointCloud> pointcloud);
35  size_t CountSelected() const;
46  int32_t SelectPoint(const geom::Ray3 &ray);
57  int32_t DeselectPoint(const geom::Ray3 &ray);
64  void SelectPoint(int32_t point_index);
71  void DeselectPoint(int32_t point_index);
81  void SelectPointsAround(int32_t point_index, float selection_radius);
91  void DeselectPointsAround(int32_t point_index, float deselection_radius);
93  void DeselectAllPoints();
100  const std::set<int32_t> &GetSelectedPoints() const;
101 
102  private:
103  std::shared_ptr<cogs::PointCloud> pointcloud_;
104  cogs::Octree octree_;
105  std::set<int32_t> selected_points_;
106  };
107 }
108 
109 #endif /* !COGS_POINT_CLOUD_SELECTOR_H */
Namespace of "Computer Graphic Structures" library, which implement many core classes and structures...
Definition: AabbHierarchy.h:8
Space-partitioning data structure for point clouds.
Definition: Octree.h:16
API for selecting points from a point cloud by ray-casting.
Definition: PointCloudSelector.h:15