33#include < Eigen/Core>
44#include < open3d/Open3D.h>
55
6+ #include < diffCheck/transformation/DFTransformation.hh>
7+
68
79namespace diffCheck ::geometry
810{
@@ -12,8 +14,8 @@ namespace diffCheck::geometry
1214 DFPointCloud () = default ;
1315 ~DFPointCloud () = default ;
1416
15- // /< Converters from other point cloud datatypes libraries to our format
16- public:
17+
18+ public: // /< Converters from other point cloud datatypes libraries to our format
1719 /* *
1820 * @brief Converter from open3d point cloud to our datatype
1921 *
@@ -28,26 +30,45 @@ namespace diffCheck::geometry
2830 */
2931 std::shared_ptr<open3d::geometry::PointCloud> Cvt2O3DPointCloud ();
3032
31- // /< I/O loader
32- public:
33+ public: // /< Utilities
34+ /* *
35+ * @brief Compute the "point to point" distance between this and another point clouds.
36+ *
37+ * For every point in the source point cloud, it looks in the KDTree of the target point cloud and finds the closest point.
38+ * It returns a vector of distances, one for each point in the source point cloud.
39+ *
40+ * @param target The target diffCheck point cloud
41+ * @return std::vector<double> A vector of distances, one for each point in the source point cloud.
42+ *
43+ * @see https://github.com/isl-org/Open3D/blob/main/cpp/open3d/geometry/PointCloud.cpp
44+ */
45+ std::vector<double > ComputeP2PDistance (std::shared_ptr<geometry::DFPointCloud> target);
46+
47+ public: // /< Transformers
48+ /* *
49+ * @brief Apply a transformation to the point cloud
50+ *
51+ * @param transformation the transformation to apply
52+ */
53+ void ApplyTransformation (const diffCheck::transformation::DFTransformation &transformation);
54+
55+ public: // /< I/O loader
3356 /* *
3457 * @brief Read a point cloud from a file
3558 *
3659 * @param filename the path to the file with the extension
3760 */
3861 void LoadFromPLY (const std::string &path);
3962
40- // /< Getters
41- public:
63+ public: // /< Getters
4264 // / @brief Number of points in the point cloud
4365 int GetNumPoints () const { return this ->Points .size (); }
4466 // / @brief Number of colors in the point cloud
4567 int GetNumColors () const { return this ->Colors .size (); }
4668 // / @brief Number of normals in the point cloud
4769 int GetNumNormals () const { return this ->Normals .size (); }
4870
49- // /< Basic point cloud data
50- public:
71+ public: // /< Basic point cloud data
5172 // / @brief Eigen vector of 3D points
5273 std::vector<Eigen::Vector3d> Points;
5374 // / @brief Eigen vector of 3D colors
0 commit comments