Skip to content

Commit

Permalink
Move point vector example before point set example
Browse files Browse the repository at this point in the history
  • Loading branch information
JacksonCampolattaro committed Aug 13, 2020
1 parent f123ecb commit 85af7a9
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
22 changes: 11 additions & 11 deletions Octree/doc/Octree/Octree.txt
Expand Up @@ -16,17 +16,6 @@ The Octree package provides the Octree and Node classes.

\section Section_Octree_Examples Examples

\subsection Section_Octree_Example_Point_Set Building an Octree from a Point_set_3

This example illustrates how to create an octree from a `Point_set_3` loaded from a file.

An octree is constructed from the point set and its map.
The tree is refined with a max-depth (deepest node allowed) of 10,
and a bucket size (maximum number of points contained by a single node) of 20.
The tree is then printed to the standard output.

\cgalExample{Octree/Octree_build_from_Point_set.cpp}

\subsection Section_Octree_Example_Point_Vector Building an Octree from a Vector of Points

This example illustrates how to create an octree from a collection of points that isn't a `Point_set_3`.
Expand All @@ -40,6 +29,17 @@ The split criterion is manually constructed and passed to the refine method.

\cgalExample{Octree/Octree_build_from_Point_vector.cpp}

\subsection Section_Octree_Example_Point_Set Building an Octree from a Point_set_3

This example illustrates how to create an octree from a `Point_set_3` loaded from a file.

An octree is constructed from the point set and its map.
The tree is refined with a max-depth (deepest node allowed) of 10,
and a bucket size (maximum number of points contained by a single node) of 20.
The tree is then printed to the standard output.

\cgalExample{Octree/Octree_build_from_Point_set.cpp}

\subsection Section_Octree_Example_Custom_Split_Criterion Building an Octree with a Custom Split_criterion

This example illustrates how to refine an octree using a split criterion that isn't provided by default.
Expand Down
6 changes: 3 additions & 3 deletions Octree/include/CGAL/Octree/Node.h
Expand Up @@ -367,16 +367,16 @@ class Node {

const Self *adjacent(std::bitset<3> direction) const {

// Direction: LEFT RIGHT DOWN UP BACK FRONT
// direction: 000 001 010 011 100 101

// Nodes only have up to 6 different adjacent nodes (since cubes have 6 sides)
assert(direction.to_ulong() < 6);

// The root node has no adjacent nodes!
if (is_root())
return nullptr;

// Direction: LEFT RIGHT DOWN UP BACK FRONT
// direction: 000 001 010 011 100 101

// The least significant bit indicates the sign (which side of the node)
bool sign = direction[0];

Expand Down

0 comments on commit 85af7a9

Please sign in to comment.