41# pragma GCC system_header
45#include <pcl/console/print.h>
59 template <
typename Po
intT>
inline float
62 Eigen::Vector3f
diff = p1.getVector3fMap () - p2.getVector3fMap ();
63 return (
diff.norm ());
67 template<
typename Po
intT>
inline float
70 Eigen::Vector3f
diff = p1.getVector3fMap () - p2.getVector3fMap ();
71 return (
diff.squaredNorm ());
80 template<
typename Po
intT,
typename NormalT>
inline void
85 const Eigen::Vector3f normal = plane_normal.getVector3fMapConst ();
87 projected.getVector3fMap () = point.getVector3fMapConst () - (
lambda * normal);
98 const Eigen::Vector3f& plane_normal, Eigen::Vector3f&
projected)
101 float lambda = plane_normal.dot(
po);
114 inline Eigen::Vector3f
117 Eigen::Vector3f
const &plane_normal)
133 inline Eigen::Vector3f
138 if (std::abs (
axis.z ()) > 1E-8f)
142 else if (std::abs (
axis.y ()) > 1E-8f)
146 else if (std::abs (
axis.x ()) > 1E-8f)
152 PCL_WARN (
"[pcl::randomOrthogonalAxis] provided axis has norm < 1E-8f\n");
Iterator class for point clouds with or without given indices.
Eigen::Vector3f projectedAsUnitVector(Eigen::Vector3f const &point, Eigen::Vector3f const &plane_origin, Eigen::Vector3f const &plane_normal)
Given a plane defined by plane_origin and plane_normal, find the unit vector pointing from plane_orig...
Eigen::Vector3f randomOrthogonalAxis(Eigen::Vector3f const &axis)
Define a random unit vector orthogonal to axis.
float distance(const PointT &p1, const PointT &p2)
float squaredDistance(const PointT &p1, const PointT &p2)
void project(const PointT &point, const PointT &plane_origin, const NormalT &plane_normal, PointT &projected)
A point structure representing normal coordinates and the surface curvature estimate.
A point structure representing Euclidean xyz coordinates, and the RGB color.