Skip to content

Commit

Permalink
Add examples of using the subscript operator directly on the octree
Browse files Browse the repository at this point in the history
  • Loading branch information
JacksonCampolattaro committed Aug 14, 2020
1 parent 02fc711 commit ff12caa
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Octree/examples/Octree/Octree_traversal_manual.cpp
Expand Up @@ -44,12 +44,16 @@ int main(int argc, char **argv) {
std::cout << octree.root()[0] << std::endl;
std::cout << "the fifth child: " << std::endl;
std::cout << octree.root()[4] << std::endl;
std::cout << "the fifth child, accessed without the root keyword: " << std::endl;
std::cout << octree[4] << std::endl;
std::cout << "the second child of the fourth child: " << std::endl;
std::cout << octree.root()[4][1] << std::endl;
std::cout << "the second child of the fourth child, accessed without the root keyword: " << std::endl;
std::cout << octree[4][1] << std::endl;
std::cout << std::endl;

// Retrieve one of the deeper children
const Octree::Node &cur = octree.root()[3][2];
const Octree::Node &cur = octree[3][2];
std::cout << "Navigation relative to a child node" << std::endl;
std::cout << "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" << std::endl;
std::cout << "the third child of the fourth child: " << std::endl;
Expand Down

0 comments on commit ff12caa

Please sign in to comment.