worked on grid-walker and synthetic steps/turns
This commit is contained in:
@@ -193,10 +193,22 @@ namespace GW3 {
|
||||
return bbox.contains(pt);
|
||||
}
|
||||
|
||||
// /** does one of the given grid-nodes contains the provided point-in-question? */
|
||||
// static const Node* contains(const Grid<Node>& grid, const Nodes<Node>& nodes, Point2 pt) {
|
||||
// for (const Node* n : nodes) {
|
||||
// if (contains(grid, n, pt)) {
|
||||
// return n;
|
||||
// }
|
||||
// }
|
||||
// return nullptr;
|
||||
// }
|
||||
|
||||
/** does one of the given grid-nodes contains the provided point-in-question? */
|
||||
static const Node* contains(const Grid<Node>& grid, const Nodes<Node>& nodes, Point2 pt) {
|
||||
static const Node* contains(const Grid<Node>& grid, const std::vector<const Node*>& nodes, Point2 pt) {
|
||||
for (const Node* n : nodes) {
|
||||
if (contains(grid, n, pt)) {return n;}
|
||||
if (contains(grid, n, pt)) {
|
||||
return n;
|
||||
}
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user