worked on 3d models within map

adjusted grid factory
adjusted nav mesh factory
minoor changes/fixes
new helper classes
refactoring
This commit is contained in:
2018-04-03 14:55:59 +02:00
parent f3b6155157
commit 1c2081d406
25 changed files with 620 additions and 93 deletions

View File

@@ -9,13 +9,13 @@
/** allows interpolation along a synthetic path */
class SyntheticPath : private Interpolator<float, Point3> {
using Base = Interpolator<float, Point3>;
using Entry = Base::InterpolatorEntry;
const Floorplan::IndoorMap* map;
public:
using Base = Interpolator<float, Point3>;
using Entry = Base::InterpolatorEntry;
/** create path using the given ground-truth points from the map */
void create(const Floorplan::IndoorMap* map, std::vector<int> ids) {
@@ -38,6 +38,19 @@ public:
}
/** get the path's length */
float getLength() const {
//return Base::getEntries().back().key;
float dist = 0;
for (size_t i = 0; i < getEntries().size()-1; ++i) {
const auto& e1 = getEntries()[i];
const auto& e2 = getEntries()[i+1];
dist += e1.value.getDistance(e2.value);
}
return dist;
}
/** get all individual entries from the underlying data-structure */
const std::vector<Entry>& getEntries() const {
return Base::getEntries();