35#ifndef PCL_FILTERS_IMPL_PLANE_CLIPPER3D_HPP
36#define PCL_FILTERS_IMPL_PLANE_CLIPPER3D_HPP
38#include <pcl/filters/plane_clipper3D.h>
40template<
typename Po
intT>
46template<
typename Po
intT>
51template<
typename Po
intT>
void
57template<
typename Po
intT>
const Eigen::Vector4f&
69template<
typename Po
intT>
float
72 return (plane_params_[0] * point.x + plane_params_[1] * point.y + plane_params_[2] * point.z + plane_params_[3]);
75template<
typename Po
intT>
bool
78 return ((plane_params_[0] * point.x + plane_params_[1] * point.y + plane_params_[2] * point.z ) >= -plane_params_[3]);
84template<
typename Po
intT>
bool
87 float dist1 = getDistance (point1);
88 float dist2 = getDistance (point2);
113template<
typename Po
intT>
void
143 typename std::vector<PointT, Eigen::aligned_allocator<PointT> >::const_iterator
prev_it =
polygon.begin ();
148 float distance = getDistance (*
pIt);
170template<
typename Po
intT>
void
173 std::vector<PointT, Eigen::aligned_allocator<PointT> >
clipped;
179template<
typename Po
intT>
void
182 if (indices.empty ())
222 for (
const auto& index : indices)
Iterator class for point clouds with or without given indices.
std::size_t size() const
Size of the range the iterator is going through.
void setPlaneParameters(const Eigen::Vector4f &plane_params)
Set new plane parameters.
const Eigen::Vector4f & getPlaneParameters() const
return the current plane parameters
virtual bool clipPoint3D(const PointT &point) const
interface to clip a single point
virtual ~PlaneClipper3D() noexcept
virtual Clipper3D< PointT > * clone() const
polymorphic method to clone the underlying clipper with its parameters.
virtual bool clipLineSegment3D(PointT &from, PointT &to) const
virtual void clipPlanarPolygon3D(std::vector< PointT, Eigen::aligned_allocator< PointT > > &polygon) const
virtual void clipPointCloud3D(const pcl::PointCloud< PointT > &cloud_in, Indices &clipped, const Indices &indices=Indices()) const
interface to clip a point cloud
PlaneClipper3D(const Eigen::Vector4f &plane_params)
Constructor taking the homogeneous representation of the plane as a Eigen::Vector4f.
float getDistance(const PointT &point) const
IndicesAllocator<> Indices
Type used for indices in PCL.
A point structure representing Euclidean xyz coordinates, and the RGB color.