#ifndef GROUND_SEGMENTATION_BIN_H_ #define GROUND_SEGMENTATION_BIN_H_ #include #include #include class Bin { public: struct MinZPoint { MinZPoint() : z(0), d(0) {} MinZPoint(const double& d, const double& z) : z(z), d(d) {} bool operator==(const MinZPoint& comp) {return z == comp.z && d == comp.d;} double z; double d; }; private: std::atomic has_point_; std::atomic min_z; std::atomic min_z_range; public: Bin(); /// \brief Fake copy constructor to allow vector > initialization. Bin(const Bin& segment); void addPoint(const pcl::PointXYZ& point); void addPoint(const double& d, const double& z); MinZPoint getMinZPoint(); inline bool hasPoint() {return has_point_;} }; #endif /* GROUND_SEGMENTATION_BIN_H_ */