diff --git a/Octree/doc/Octree/Octree.txt b/Octree/doc/Octree/Octree.txt index 98ec46462e2..f375c36cf9a 100644 --- a/Octree/doc/Octree/Octree.txt +++ b/Octree/doc/Octree/Octree.txt @@ -19,19 +19,27 @@ Octrees are most useful when implementing algorithms that require nodes without \section Section_Usage Usage -\subsection Section_Octree_Building Building an Octree +\subsection Section_Octree_Building Building -\subsubsection Section_Octree_Example_Point_Vector Building an Octree from a Vector of Points +Before an octree can be used for anything, the tree itself must be created. +By default, the constructor returns a tree with a single (root) node that contains all the points. +We can use the `refine` method to subdivide space further. + +\subsubsection Section_Octree_Point_Vector Building an Octree from a Vector of Points + +\b Example This example illustrates how to create an octree from a `std::vector`. An `std::vector` is manually filled with points. The vector is used as the point set, -a `CGAL::Identity_property_map` it automatically set as the octree's map type, so a map doesn't need to be provided. +a `CGAL::Identity_property_map` is automatically set as the octree's map type, so a map doesn't need to be provided. \cgalExample{Octree/Octree_build_from_Point_vector.cpp} -\subsubsection Section_Octree_Example_Point_Set Building an Octree from a Point_set_3 +\subsubsection Section_Octree_Point_Set Building an Octree from a Point_set_3 + +\b Example This example illustrates how to create an octree from a `Point_set_3` loaded from a file. It also shows a more explicit way of setting the split criteria when refining the tree. @@ -45,7 +53,9 @@ The split criterion is manually constructed and passed to the refine method. \cgalExample{Octree/Octree_build_from_Point_set.cpp} -\subsubsection Section_Octree_Example_Custom_Split_Criterion Building an Octree with a Custom Split Criterion +\subsubsection Section_Octree_Custom_Split_Criterion Building an Octree with a Custom Split Criterion + +\b Example This example illustrates how to refine an octree using a split criterion that isn't provided by default. @@ -55,22 +65,11 @@ For example, for a ratio of 2, a node at depth 2 can hold 4 points, a node at de \cgalExample{Octree/Octree_build_with_custom_split.cpp} -\subsection Section_Octree_Nearest_Neighbor Nearest Neighbor - -\subsubsection Section_Octree_Example_Nearest_Neighbor Finding the Nearest Neighbor of a Point - -This example illustrates how to use an octree to accelerate the search for points close to a location. - -Points are loaded from a file and an octree is built. -The nearest neighbor method is invoked for several input points. -A k value of 1 is used to find the single closest point. -Results are put in a vector, and then printed. - -\cgalExample{Octree/Octree_find_nearest_neighbor.cpp} - \subsection Section_Octree_Traversal Traversal -\subsubsection Section_Octree_Example_Manual_Traveral Manual Traversal +\subsubsection Section_Octree_Manual_Traveral Manual Traversal + +\b Example This example demonstrates ways of accessing different nodes of a tree, given a reference to one. @@ -88,7 +87,9 @@ These accessors and operators can be chained to access any node in the tree in a \cgalExample{Octree/Octree_traversal_manual.cpp} -\subsubsection Section_Octree_Example_Preorder_Traversal Preorder Traversal +\subsubsection Section_Octree_Preorder_Traversal Preorder Traversal + +\b Example This example illustrates how to use the provided traversals. @@ -99,15 +100,35 @@ In this case, we print out the nodes of the tree without indentation instead. \cgalExample{Octree/Octree_traversal_preorder.cpp} + +\subsection Section_Octree_Acceleration Acceleration + +\subsubsection Section_Octree_Nearest_Neighbor Finding the Nearest Neighbor of a Point + +\b Example + +This example illustrates how to use an octree to accelerate the search for points close to a location. + +Points are loaded from a file and an octree is built. +The nearest neighbor method is invoked for several input points. +A k value of 1 is used to find the single closest point. +Results are put in a vector, and then printed. + +\cgalExample{Octree/Octree_find_nearest_neighbor.cpp} + \subsubsection Section_Octree_Grade Grading an octree +\b Example + This example demonstrates how to use the grade method to eliminate large jumps in depth within the octree. A tree is created such that one node is split many more times than those it borders.