Skip to content

Commit

Permalink
Merge pull request #2775 from SunBlack/Wdelete-non-virtual-dtor
Browse files Browse the repository at this point in the history
Fix warning delete-non-virtual-dtor
  • Loading branch information
SergioRAgostinho authored Jan 19, 2019
2 parents 9b5e450 + 1d1e705 commit 787d493
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 65 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ namespace pcl
pcl::PointCloud<pcl::Normal>::Ptr normals_;

public:
virtual
~GlobalEstimator() = default;

virtual void
estimate (PointInTPtr & in, PointInTPtr & processed, std::vector<pcl::PointCloud<FeatureT>, Eigen::aligned_allocator<
pcl::PointCloud<FeatureT> > > & signatures, std::vector<Eigen::Vector3f, Eigen::aligned_allocator<Eigen::Vector3f> > & centroids)=0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ namespace pcl
float radius_;

public:
virtual
~KeypointExtractor() = default;

void
setInputCloud (PointInTPtr & input)
{
Expand Down Expand Up @@ -417,6 +420,9 @@ namespace pcl
keypoint_extractor_.clear ();
}

virtual
~LocalEstimator() = default;

void
setAdaptativeMLS (bool b)
{
Expand Down Expand Up @@ -453,71 +459,6 @@ namespace pcl
support_radius_ = r;
}

/*void
setFilterPlanar (bool b)
{
filter_planar_ = b;
}
void
filterPlanar (PointInTPtr & input, KeypointCloud & keypoints_cloud)
{
pcl::PointCloud<int> filtered_keypoints;
//create a search object
typename pcl::search::Search<PointInT>::Ptr tree;
if (input->isOrganized ())
tree.reset (new pcl::search::OrganizedNeighbor<PointInT> ());
else
tree.reset (new pcl::search::KdTree<PointInT> (false));
tree->setInputCloud (input);
//std::vector<int> nn_indices;
//std::vector<float> nn_distances;
neighborhood_indices_.reset (new std::vector<std::vector<int> >);
neighborhood_indices_->resize (keypoints_cloud.points.size ());
neighborhood_dist_.reset (new std::vector<std::vector<float> >);
neighborhood_dist_->resize (keypoints_cloud.points.size ());
filtered_keypoints.points.resize (keypoints_cloud.points.size ());
int good = 0;
//#pragma omp parallel for num_threads(8)
for (size_t i = 0; i < keypoints_cloud.points.size (); i++)
{
if (tree->radiusSearch (keypoints_cloud[i], support_radius_, (*neighborhood_indices_)[good], (*neighborhood_dist_)[good]))
{
EIGEN_ALIGN16 Eigen::Matrix3f covariance_matrix;
Eigen::Vector4f xyz_centroid;
EIGEN_ALIGN16 Eigen::Vector3f eigenValues;
EIGEN_ALIGN16 Eigen::Matrix3f eigenVectors;
//compute planarity of the region
computeMeanAndCovarianceMatrix (*input, (*neighborhood_indices_)[good], covariance_matrix, xyz_centroid);
pcl::eigen33 (covariance_matrix, eigenVectors, eigenValues);
float eigsum = eigenValues.sum ();
if (!pcl_isfinite(eigsum))
{
PCL_ERROR("Eigen sum is not finite\n");
}
if ((fabs (eigenValues[0] - eigenValues[1]) < 1.5e-4) || (eigsum != 0 && fabs (eigenValues[0] / eigsum) > 1.e-2))
{
//region is not planar, add to filtered keypoint
keypoints_cloud.points[good] = keypoints_cloud.points[i];
good++;
}
}
}
neighborhood_indices_->resize (good);
neighborhood_dist_->resize (good);
keypoints_cloud.points.resize (good);
}*/

};
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,9 @@ namespace pcl
load_views_ = true;
}

virtual
~Source() = default;

float
getScale ()
{
Expand Down
3 changes: 3 additions & 0 deletions io/include/pcl/io/image_metadata_wrapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ namespace pcl
public:
typedef boost::shared_ptr<FrameWrapper> Ptr;

virtual
~FrameWrapper() = default;

virtual const void*
getData () const = 0;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,9 @@ namespace pcl
requires_normals_ = false;
}

virtual
~HypothesisVerification() = default;

bool getRequiresNormals() {
return requires_normals_;
}
Expand Down
1 change: 1 addition & 0 deletions visualization/src/cloud_viewer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ namespace pcl
{
struct cloud_show_base
{
virtual ~cloud_show_base() = default;
virtual void pop () = 0;
virtual bool popped () const = 0;
typedef boost::shared_ptr<cloud_show_base> Ptr;
Expand Down

0 comments on commit 787d493

Please sign in to comment.