geometry changes/fixes/new features
new grid walkers + fixes new test-cases worked on step/and turn detection android offline-data-reader worked on vap-grouping
This commit is contained in:
@@ -22,6 +22,9 @@ private:
|
||||
/** calculation helper */
|
||||
Helper<T> helper;
|
||||
|
||||
// keep a list of all vertices below stairwells and remove them hereafter
|
||||
std::vector<T*> toDelete;
|
||||
|
||||
|
||||
std::ofstream outStairs;
|
||||
std::ofstream outDelete;
|
||||
@@ -77,6 +80,7 @@ public:
|
||||
}
|
||||
|
||||
~Stairs() {
|
||||
finalize();
|
||||
outStairs.close();
|
||||
outDelete.close();
|
||||
}
|
||||
@@ -201,10 +205,6 @@ public:
|
||||
}
|
||||
|
||||
|
||||
// keep a list of all vertices below stairwells and remove them hereafter
|
||||
std::vector<T*> toDelete;
|
||||
|
||||
|
||||
// add all stair nodes or replace them with already existing ones
|
||||
for (Intermediate& iNode : stairNodes) {
|
||||
|
||||
@@ -288,13 +288,23 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
// delete all pending nodes and perform a cleanup
|
||||
for (T* n : toDelete) {grid.remove(*n);}
|
||||
grid.cleanup();
|
||||
// finalize after ALL stairs were added. much faster and should be safe!
|
||||
//finalize();
|
||||
|
||||
|
||||
}
|
||||
|
||||
void finalize() {
|
||||
|
||||
// delete all pending nodes and perform a cleanup
|
||||
if (!toDelete.empty()) {
|
||||
for (T* n : toDelete) {grid.remove(*n);}
|
||||
toDelete.clear();
|
||||
grid.cleanup();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
static float minZ(const std::vector<XYZ>& points) {
|
||||
auto comp = [] (const XYZ& a, const XYZ& b) {return a.z < b.z;};
|
||||
auto it = std::min_element(points.begin(), points.end(), comp);
|
||||
|
||||
Reference in New Issue
Block a user