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_
A point structure representing normal coordinates and the surface curvature estimate.
float squaredDistance(const PointT &p1, const PointT &p2)
float distance(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 Euclidean xyz coordinates, and the RGB color.