Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Split tree walker testing into its own file
- Loading branch information
1 parent
beac2ee
commit 43a9819
Showing
5 changed files
with
82 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
#define CGAL_TRACE_STREAM std::cerr | ||
|
||
#include <CGAL/Octree.h> | ||
#include <CGAL/Octree/IO.h> | ||
#include <CGAL/Octree/Tree_walker_criterion.h> | ||
|
||
#include <CGAL/Simple_cartesian.h> | ||
#include <CGAL/Point_set_3.h> | ||
|
||
typedef CGAL::Simple_cartesian<double> Kernel; | ||
typedef Kernel::Point_3 Point; | ||
typedef CGAL::Point_set_3<Point> Point_set; | ||
typedef CGAL::Octree | ||
<Point_set, typename Point_set::Point_map> | ||
Octree; | ||
|
||
int main(void) { | ||
|
||
Point_set points; | ||
points.insert({-1, -1, -1}); | ||
points.insert({1, -1, -1}); | ||
points.insert({-1, 1, -1}); | ||
points.insert({1, 1, -1}); | ||
points.insert({-1, -1, 1}); | ||
points.insert({1, -1, 1}); | ||
points.insert({-1, 1, 1}); | ||
points.insert({1, 1, 1}); | ||
|
||
points.insert({-1, -1, -1.1}); | ||
points.insert({-1, -1, -1.2}); | ||
points.insert({-1, -1, -1.3}); | ||
points.insert({-1, -1, -1.4}); | ||
points.insert({-1, -1, -1.5}); | ||
points.insert({-1, -1, -1.6}); | ||
points.insert({-1, -1, -1.7}); | ||
points.insert({-1, -1, -1.8}); | ||
points.insert({-1, -1, -1.9}); | ||
|
||
auto point_map = points.point_map(); | ||
|
||
Octree octree(points, point_map); | ||
octree.refine(10, 1); | ||
|
||
auto treeWalker = CGAL::Depth_first(); | ||
octree.print(std::cout, treeWalker.first(&octree.root()), treeWalker); | ||
|
||
return 0; | ||
} |