[Positioning] Add Stock::reference_point_exists()
This commit is contained in:
parent
c11e33fd0b
commit
84acee629c
|
@ -342,6 +342,14 @@ bool Stock::is_ap_coordinate(const Point3D &coord)
|
||||||
/* *** ReferencePoint operations *** */
|
/* *** ReferencePoint operations *** */
|
||||||
|
|
||||||
|
|
||||||
|
bool Stock::reference_point_exists(const ReferencePoint &point)
|
||||||
|
{
|
||||||
|
unordered_set<ReferencePoint>::const_iterator i =
|
||||||
|
reference_points.find(point) ;
|
||||||
|
return i != reference_points.end() ;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param point Coordinates of the wanted ReferencePoint.
|
* @param point Coordinates of the wanted ReferencePoint.
|
||||||
* @return The ReferencePoint at the given coordinates, if found.
|
* @return The ReferencePoint at the given coordinates, if found.
|
||||||
|
|
|
@ -122,6 +122,8 @@ public:
|
||||||
//@{
|
//@{
|
||||||
/// Returns the number of reference points
|
/// Returns the number of reference points
|
||||||
static unsigned int nb_reference_points(void) ;
|
static unsigned int nb_reference_points(void) ;
|
||||||
|
/// Verify the existence of a reference point at the given coordinates
|
||||||
|
static bool reference_point_exists(const ReferencePoint &point) ;
|
||||||
/// Reads the ReferencePoint at the given coordinates
|
/// Reads the ReferencePoint at the given coordinates
|
||||||
static const ReferencePoint&
|
static const ReferencePoint&
|
||||||
get_reference_point(const ReferencePoint &point) ;
|
get_reference_point(const ReferencePoint &point) ;
|
||||||
|
|
Loading…
Reference in New Issue