| 682 | |
| 683 | |
| 684 | void CopcReader::loadHierarchy() |
| 685 | { |
| 686 | // Determine all the keys that overlap the queried area by traversing the |
| 687 | // hierarchy: |
| 688 | copc::Key key; |
| 689 | |
| 690 | // In case a point count was specified, don't fetch more hierarchy than necessary. |
| 691 | m_p->hierarchyPointCount = count(); |
| 692 | if (!passesFilter(key)) |
| 693 | return; |
| 694 | |
| 695 | copc::HierarchyPage page(fetch(m_p->copc_info.root_hier_offset, |
| 696 | (uint32_t)m_p->copc_info.root_hier_size)); |
| 697 | |
| 698 | copc::Entry entry = page.find(key); |
| 699 | if (!entry.valid()) |
| 700 | throwError("Root hierarchy page missing root entry."); |
| 701 | loadHierarchy(m_p->hierarchy, page, entry); |
| 702 | m_p->pool->await(); |
| 703 | } |
| 704 | |
| 705 | |
| 706 | void CopcReader::loadHierarchy(copc::Hierarchy& hierarchy, const copc::HierarchyPage& page, |