MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / FindContained

Method FindContained

src/core/kdtree.hpp:457–467  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

455 */
456 template <typename Outputter>
457 void FindContained(CoordT x1, CoordT y1, CoordT x2, CoordT y2, const Outputter &outputter) const
458 {
459 assert(x1 < x2);
460 assert(y1 < y2);
461
462 if (this->Count() == 0) return;
463
464 CoordT p1[2] = { x1, y1 };
465 CoordT p2[2] = { x2, y2 };
466 this->FindContainedRecursive(p1, p2, this->root, 0, outputter);
467 }
468
469 /**
470 * Find all items contained within the given rectangle.

Callers 3

ForAllStationsRadiusFunction · 0.80
ViewportAddKdtreeSignsFunction · 0.80
CheckClickOnViewportSignFunction · 0.80

Calls 3

CountMethod · 0.95
push_backMethod · 0.80

Tested by

no test coverage detected