Blue Brain BioExplorer
VectorOctreeNode.cpp
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 #include "VectorOctreeNode.h"
25 
26 namespace core
27 {
28 VectorOctreeNode::VectorOctreeNode(const Vector3f& center, const double size)
29  : _center(center)
30  , _size(size)
31 {
32 }
33 
35 {
36  _children.push_back(child);
37 }
38 
40 {
41  _value += value;
42 }
43 
45 {
46  return _center;
47 }
48 
50 {
51  return _value;
52 }
53 
54 const std::vector<VectorOctreeNode*>& VectorOctreeNode::getChildren() const
55 {
56  return _children;
57 }
58 } // namespace core
The VectorOctreeNode class implement a spherical node of the Octree acceleration structure used by th...
VectorOctreeNode(const Vector3f &center, const double size)
Construct a new Octree Node object.
void addValue(const Vector3d &vector)
Add a value to the node.
const std::vector< VectorOctreeNode * > & getChildren() const
Get the node children.
const Vector3d & getValue() const
Get the value of the node.
const Vector3f & getCenter() const
Get the center of the node.
void setChild(VectorOctreeNode *child)
Add a Child to the node.
glm::vec3 Vector3f
Definition: MathTypes.h:137
glm::vec< 3, double > Vector3d
Definition: MathTypes.h:143