Created
July 27, 2020 03:44
-
-
Save alec-deason/6218fb2fd6262bdd63473e417e050004 to your computer and use it in GitHub Desktop.
Code to reproduce unreachable! error
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use rstar::{Point, RTree}; | |
fn main() { | |
let bulk_nodes = vec![ | |
[570.0, 1080.0, 89.0], | |
[30.0, 1080.0, 627.0], | |
[1916.0, 1080.0, 68.0], | |
[274.0, 1080.0, 790.0], | |
[476.0, 1080.0, 895.0], | |
[1557.0, 1080.0, 250.0], | |
[1546.0, 1080.0, 883.0], | |
[1512.0, 1080.0, 610.0], | |
[1729.0, 1080.0, 358.0], | |
[1841.0, 1080.0, 434.0], | |
[1752.0, 1080.0, 696.0], | |
[1674.0, 1080.0, 705.0], | |
[136.0, 1080.0, 22.0], | |
[1593.0, 1080.0, 71.0], | |
[586.0, 1080.0, 272.0], | |
[348.0, 1080.0, 373.0], | |
[502.0, 1080.0, 2.0], | |
[1488.0, 1080.0, 1072.0], | |
[31.0, 1080.0, 526.0], | |
[1695.0, 1080.0, 559.0], | |
[1663.0, 1080.0, 298.0], | |
[316.0, 1080.0, 417.0], | |
[1348.0, 1080.0, 731.0], | |
[784.0, 1080.0, 126.0], | |
[225.0, 1080.0, 847.0], | |
[79.0, 1080.0, 819.0], | |
[320.0, 1080.0, 504.0], | |
[1714.0, 1080.0, 1026.0], | |
[264.0, 1080.0, 229.0], | |
[108.0, 1080.0, 158.0], | |
[1665.0, 1080.0, 604.0], | |
[496.0, 1080.0, 231.0], | |
[1813.0, 1080.0, 865.0], | |
[1200.0, 1080.0, 326.0], | |
[1661.0, 1080.0, 818.0], | |
[135.0, 1080.0, 229.0], | |
[424.0, 1080.0, 1016.0], | |
[1708.0, 1080.0, 791.0], | |
[1626.0, 1080.0, 682.0], | |
[442.0, 1080.0, 895.0], | |
]; | |
let nodes = vec![ | |
[1916.0, 1060.0, 68.0], | |
[1664.0, 1060.0, 298.0], | |
[1594.0, 1060.0, 71.0], | |
[225.0, 1060.0, 846.0], | |
[1841.0, 1060.0, 434.0], | |
[502.0, 1060.0, 2.0], | |
[1625.5852, 1060.0122, 682.0], | |
[1348.5273, 1060.0029, 731.08124], | |
[316.36127, 1060.0298, 418.24515], | |
[1729.3253, 1060.0023, 358.50134], | |
]; | |
let mut tree = RTree::bulk_load(bulk_nodes); | |
for node in nodes { | |
tree.insert(node); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment