Skip to content

Commit a6df2dc

Browse files
UPDATE: DFPointCloud now with AddPoints method
1 parent ca07555 commit a6df2dc

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

src/diffCheck/geometry/DFPointCloud.cc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,13 @@ namespace diffCheck::geometry
273273
this->Normals = cloud->Normals;
274274
}
275275

276+
void DFPointCloud::AddPoints(const DFPointCloud &pointCloud)
277+
{
278+
this->Points.insert(this->Points.end(), pointCloud.Points.begin(), pointCloud.Points.end());
279+
this->Colors.insert(this->Colors.end(), pointCloud.Colors.begin(), pointCloud.Colors.end());
280+
this->Normals.insert(this->Normals.end(), pointCloud.Normals.begin(), pointCloud.Normals.end());
281+
}
282+
276283
Eigen::Vector3d DFPointCloud::GetCenterPoint()
277284
{
278285
if (this->Points.size() == 0)

src/diffCheck/geometry/DFPointCloud.hh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,13 @@ namespace diffCheck::geometry
156156
*/
157157
void LoadFromPLY(const std::string &path);
158158

159+
/**
160+
* @brief adds the points, colors and normals from another point cloud
161+
*
162+
* @param pointCloud the other point cloud
163+
*/
164+
void AddPoints(const DFPointCloud &pointCloud);
165+
159166
public: ///< Getters
160167
/// @brief Number of points in the point cloud
161168
int GetNumPoints() const { return this->Points.size(); }

0 commit comments

Comments
 (0)