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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user