pushing before transfering ownership

added new tests and new helper classes
speed improvements
minor fixes
This commit is contained in:
2016-01-25 17:54:58 +01:00
parent 5aedce47f1
commit b503fb9bdc
6 changed files with 156 additions and 27 deletions

View File

@@ -158,6 +158,12 @@ public:
return nodes[hashes[uid]];
}
/** get the center-node the given Point belongs to. or nullptr if not present */
const T* getNodePtrFor(const GridPoint& p) {
auto it = hashes.find(getUID(p));
return (it == hashes.end()) ? (nullptr) : (&nodes[it->second]);
}
/** get the BBox for the given node */
GridNodeBBox getBBox(const int idx) const {
return getBBox(nodes[idx]);