Skip to content

Commit

Permalink
Use bold text to indicate examples
Browse files Browse the repository at this point in the history
  • Loading branch information
JacksonCampolattaro committed Aug 24, 2020
1 parent 488a295 commit 61b36d8
Showing 1 changed file with 42 additions and 21 deletions.
63 changes: 42 additions & 21 deletions Octree/doc/Octree/Octree.txt
Expand Up @@ -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<Point_3>` 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.
Expand All @@ -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.

Expand All @@ -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.

Expand All @@ -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.

Expand All @@ -99,15 +100,35 @@ In this case, we print out the nodes of the tree without indentation instead.
\cgalExample{Octree/Octree_traversal_preorder.cpp}

<!--
\subsubsection Section_Octree_Example_Custom_Traversal Using a Custom Traversal Method
\subsubsection Section_Octree_Custom_Traversal Using a Custom Traversal Method

\b Example

e.g. I've build a tree and I want to print it out, but layer by layer

\cgalExample{Octree/Octree_traversal_custom.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.
Expand Down

0 comments on commit 61b36d8

Please sign in to comment.