Skip to content

Commit

Permalink
Replace IntPoint_3 with std::array<uint32_t, 3>
Browse files Browse the repository at this point in the history
  • Loading branch information
JacksonCampolattaro committed Jun 16, 2020
1 parent 80ab980 commit a5e037b
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 3 deletions.
18 changes: 18 additions & 0 deletions Octree/benchmark/Octree/results/2020-06-16~2.txt
@@ -0,0 +1,18 @@
Tue Jun 16 18:00:46 2020

Benchmark Configuration
~~~~~~~~~~~~~~~~~~~~~~~
Bucket Size: 20
Max Depth: 10
Dataset Source: ../data/archer_statue_scan.ply
Point Count: 380306
Number of Runs: 40

Results
~~~~~~~~~~~~~~~~~~~~~~~
Tree construction time: 91 ms

Notes
~~~~~~~~~~~~~~~~~~~~~~~
IntPoint_3 replaced by std::array<uint32_t, 3>

2 changes: 1 addition & 1 deletion Octree/include/CGAL/Octree/IO.h
Expand Up @@ -18,7 +18,7 @@ void writeToStream(ostream &os, const CGAL::Octree_node<Kernel, PointRange> &nod
}

// Print out this node
os << node.location().x() << node.location().y() << node.location().z()
os << node.location()[0] << node.location()[1] << node.location()[2]
<< " contains " << node.num_points() << " points \n";

// Print out this node's children
Expand Down
4 changes: 2 additions & 2 deletions Octree/include/CGAL/Octree/Octree_node.h
Expand Up @@ -104,11 +104,11 @@ namespace CGAL {
typedef Octree_node<Kernel, PointRange> Node;
typedef typename Kernel::FT FT;
typedef typename Kernel::Point_3 Point;
typedef IntPoint_3 IntPoint;
typedef typename Kernel::Vector_3 Vector;
typedef typename PointRange::const_iterator InputIterator;
typedef typename std::list<InputIterator> IterList;

typedef std::array<uint32_t, 3> IntPoint;
typedef std::array<Node, 8> ChildList;

private: // members :
Expand All @@ -125,7 +125,7 @@ namespace CGAL {
Octree_node() :
//m_children(NULL),
m_parent(NULL),
m_location(IntPoint(0, 0, 0)),
m_location(IntPoint{0, 0, 0}),
m_depth(0) {}

~Octree_node() {
Expand Down

0 comments on commit a5e037b

Please sign in to comment.