Working on unit tests for class world

This commit is contained in:
2021-08-03 11:25:12 -04:00
parent 91d7e1c15d
commit 202c5a24ba
13 changed files with 240 additions and 103 deletions

View File

@@ -86,7 +86,7 @@ class PlaneItem {
private:
PlaneMap *pmap_;
std::string plane_;
double x_, y_, z_;
float x_, y_, z_;
int64_t id_;
public:
@@ -98,15 +98,15 @@ public:
int64_t id() const { return id_; }
const std::string &plane() const { return plane_; }
const double x() const { return x_; }
const double y() const { return y_; }
const double z() const { return z_; }
const float x() const { return x_; }
const float y() const { return y_; }
const float z() const { return z_; }
void untrack();
void track(PlaneMap *pmap);
void set_pos(const std::string &plane, double x, double y, double z);
void set_xyz(double x, double y, double z) { set_pos(plane_, x, y, z); }
void set_pos(const std::string &plane, float x, float y, float z);
void set_xyz(float x, float y, float z) { set_pos(plane_, x, y, z); }
};
class PlaneMap {
@@ -124,7 +124,7 @@ public:
~PlaneMap();
// Caution: scan_radius is not deterministically ordered.
IdVector scan_radius(const std::string &plane, double x, double y, double radius, int64_t prepend) const;
IdVector scan_radius(const std::string &plane, float x, float y, float radius, int64_t prepend) const;
private:
// unit testing stuff.