Rationalizing the use of scan_radius and making it accessible

This commit is contained in:
2021-11-23 16:10:48 -05:00
parent c75ba3b3a8
commit 8c871a9f40
10 changed files with 109 additions and 110 deletions

View File

@@ -123,8 +123,15 @@ public:
PlaneMap();
~PlaneMap();
// Caution: scan_radius is not deterministically ordered.
IdVector scan_radius(const std::string &plane, float x, float y, float radius, int64_t prepend) const;
// Caution: scan_radius is not deterministically ordered unless sort=true.
//
// exclude_nowhere - if true, and plane="nowhere", nothing is scanned.
// special - an ID that is considered special. If zero, there is no special ID.
// omit - if true, remove the special ID from the list.
// if false, prepend the special ID to the head of the list.
//
IdVector scan_radius(const std::string &plane, float x, float y, float radius, bool exclude_nowhere, int64_t special, bool omit) const;
IdVector scan_radius_unsorted(const std::string &plane, float x, float y, float radius, bool exclude_nowhere, int64_t special, bool omit) const;
private:
// unit testing stuff.