38 #ifndef PCL_GEOMETRY_H_
39 #define PCL_GEOMETRY_H_
42 # pragma GCC system_header
59 template <
typename Po
intT>
inline float
62 Eigen::Vector3f diff = p1 -p2;
63 return (diff.norm ());
67 template<
typename Po
intT>
inline float
70 Eigen::Vector3f diff = p1 -p2;
71 return (diff.squaredNorm ());
80 template<
typename Po
intT,
typename NormalT>
inline void
84 Eigen::Vector3f po = point - plane_origin;
85 const Eigen::Vector3f normal = plane_normal.getVector3fMapConst ();
86 float lambda = normal.dot(po);
87 projected.getVector3fMap () = point.getVector3fMapConst () - (lambda * normal);
97 project (
const Eigen::Vector3f& point,
const Eigen::Vector3f &plane_origin,
98 const Eigen::Vector3f& plane_normal, Eigen::Vector3f& projected)
100 Eigen::Vector3f po = point - plane_origin;
101 float lambda = plane_normal.dot(po);
102 projected = point - (lambda * plane_normal);
108 #endif //#ifndef PCL_GEOMETRY_H_