38 #ifndef PCL_SAMPLE_CONSENSUS_IMPL_SAC_MODEL_PERPENDICULAR_PLANE_H_
39 #define PCL_SAMPLE_CONSENSUS_IMPL_SAC_MODEL_PERPENDICULAR_PLANE_H_
44 template <
typename Po
intT>
void
46 const Eigen::VectorXf &model_coefficients,
const double threshold, std::vector<int> &inliers)
49 if (!isModelValid (model_coefficients))
59 template <
typename Po
intT>
int
61 const Eigen::VectorXf &model_coefficients,
const double threshold)
64 if (!isModelValid (model_coefficients))
71 template <
typename Po
intT>
void
73 const Eigen::VectorXf &model_coefficients, std::vector<double> &distances)
76 if (!isModelValid (model_coefficients))
86 template <
typename Po
intT>
bool
90 if (model_coefficients.size () != 4)
92 PCL_ERROR (
"[pcl::SampleConsensusModelPerpendicularPlane::isModelValid] Invalid number of model coefficients given (%zu)!\n", model_coefficients.size ());
100 Eigen::Vector4f coeff = model_coefficients;
103 Eigen::Vector4f axis (axis_[0], axis_[1], axis_[2], 0);
104 double angle_diff = fabs (
getAngle3D (axis, coeff));
105 angle_diff = (std::min) (angle_diff, M_PI - angle_diff);
107 if (angle_diff > eps_angle_)
114 #define PCL_INSTANTIATE_SampleConsensusModelPerpendicularPlane(T) template class PCL_EXPORTS pcl::SampleConsensusModelPerpendicularPlane<T>;
116 #endif // PCL_SAMPLE_CONSENSUS_IMPL_SAC_MODEL_PERPENDICULAR_PLANE_H_