Blue Brain BioExplorer
PointOctreeNode.h
Go to the documentation of this file.
1 /*
2  *
3  * The Blue Brain BioExplorer is a tool for scientists to extract and analyse
4  * scientific data from visualization
5  *
6  * This file is part of Blue Brain BioExplorer <https://github.com/BlueBrain/BioExplorer>
7  *
8  * Copyright 2020-2024 Blue BrainProject / EPFL
9  *
10  * This program is free software: you can redistribute it and/or modify it under
11  * the terms of the GNU General Public License as published by the Free Software
12  * Foundation, either version 3 of the License, or (at your option) any later
13  * version.
14  *
15  * This program is distributed in the hope that it will be useful, but WITHOUT
16  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17  * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
18  * details.
19  *
20  * You should have received a copy of the GNU General Public License along with
21  * this program. If not, see <https://www.gnu.org/licenses/>.
22  */
23 
24 #pragma once
25 
27 
28 namespace core
29 {
36 {
37 public:
44  PointOctreeNode(const Vector3f& center, const double size);
45 
51  void addValue(const double value);
52 
58  void setChild(PointOctreeNode* child);
59 
65  const std::vector<PointOctreeNode*>& getChildren() const;
66 
72  const Vector3f& getCenter() const;
73 
79  double getValue() const;
80 
81 private:
82  double _value;
83 
84  Vector3f _center;
85  Vector3f _size;
86 
87  std::vector<PointOctreeNode*> _children;
88 };
89 } // namespace core
The PointOctreeNode class implement a spherical node of the Octree acceleration structure used by the...
void setChild(PointOctreeNode *child)
Add a Child to the node.
void addValue(const double value)
Add a value to the node.
double getValue() const
Get the value of the node.
const Vector3f & getCenter() const
Get the center of the node.
PointOctreeNode(const Vector3f &center, const double size)
Construct a new Octree Node object.
const std::vector< PointOctreeNode * > & getChildren() const
Get the node children.
glm::vec3 Vector3f
Definition: MathTypes.h:137