/** * Converts a Point of Cartesian coordinates into a SpatialIndex::Point * @param p The point to convert * @return The converted point */ static SpatialIndex::Point convert_point_2d(const point_2d& p) { double p_coords[] = {p.x(), p.y()}; return SpatialIndex::Point(p_coords,m_dimension); }
bool operator==(const point_2d &that) const { return (this->x_ == that.x()) && (this->y_ == that.y()); }
bool operator!=(const point_2d &that) const { return (this->x_ != that.x()) || (this->y_ != that.y()); }
float dist( const point_2d& p1 , const point_2d& p2) { float d; return sqrt( pow((p2.get_x() - p1.get_x()),2) + pow((p2.get_y()-p1.get_y()),2)); };