#include <octant.h>
Collaboration diagram for mesh::Octant< NodeType >:
Public Member Functions | |
Octant (const Vector3 ¢er, double length) | |
Octant (Octant *parent, int idx) | |
~Octant () | |
int | get_child_index_for_point (const Vector3 &node_center) |
void | add_node (NodeType *node) |
void | dump (std::ostream &str) |
Public Attributes | |
Vector3 | _center |
double | _length |
Octant * | _parent |
Octant * | _children [8] |
std::vector< NodeType * > | _nodes |
Definition at line 33 of file octant.h.
mesh::Octant< NodeType >::Octant | ( | const Vector3 & | center, | |
double | length | |||
) |
Constructor for the root Octant
Definition at line 67 of file octant.h.
References mesh::Octant< NodeType >::_center, mesh::Octant< NodeType >::_children, and mesh::Octant< NodeType >::_length.
mesh::Octant< NodeType >::Octant | ( | Octant< NodeType > * | parent, | |
int | idx | |||
) |
Constructor for non-root Octants
Definition at line 79 of file octant.h.
References mesh::Octant< NodeType >::_center, mesh::Octant< NodeType >::_children, and mesh::Octant< NodeType >::_length.
mesh::Octant< NodeType >::~Octant | ( | ) |
Destructor: deallocates children Octants
Definition at line 95 of file octant.h.
References mesh::Octant< NodeType >::_children, and mesh::Octant< NodeType >::_parent.
void mesh::Octant< NodeType >::add_node | ( | NodeType * | node | ) |
Add node to this octant
Definition at line 115 of file octant.h.
References mesh::Octant< NodeType >::_nodes.
Referenced by mesh::LooseOctree< NodeType >::add_node().
void mesh::Octant< NodeType >::dump | ( | std::ostream & | str | ) |
Dump octant info including ancestor info
Definition at line 120 of file octant.h.
References mesh::Octant< NodeType >::_center, mesh::Octant< NodeType >::_length, mesh::Octant< NodeType >::_parent, mesh::Vector3::x, mesh::Vector3::y, and mesh::Vector3::z.
int mesh::Octant< NodeType >::get_child_index_for_point | ( | const Vector3 & | node_center | ) |
Return child octant index corresponding to "node_center"
Definition at line 102 of file octant.h.
References mesh::Octant< NodeType >::_center, mesh::Vector3::x, mesh::Vector3::y, and mesh::Vector3::z.
Referenced by mesh::LooseOctree< NodeType >::add_node().
Vector3 mesh::Octant< NodeType >::_center |
center of octant, x-, y- and z-coordinates
Definition at line 55 of file octant.h.
Referenced by mesh::Octant< NodeType >::dump(), mesh::Octant< NodeType >::get_child_index_for_point(), and mesh::Octant< NodeType >::Octant().
Octant* mesh::Octant< NodeType >::_children[8] |
8 child octants
Definition at line 61 of file octant.h.
Referenced by mesh::LooseOctree< NodeType >::add_node(), mesh::LooseOctree< NodeType >::export_vtk_recursive(), mesh::LooseOctree< NodeType >::get_statistics_recursive(), mesh::Octant< NodeType >::Octant(), and mesh::Octant< NodeType >::~Octant().
double mesh::Octant< NodeType >::_length |
half of the side length of the octant
Definition at line 57 of file octant.h.
Referenced by mesh::LooseOctree< NodeType >::add_node(), mesh::Octant< NodeType >::dump(), and mesh::Octant< NodeType >::Octant().
std::vector<NodeType *> mesh::Octant< NodeType >::_nodes |
Nodes stored in the octant
Definition at line 63 of file octant.h.
Referenced by mesh::Octant< NodeType >::add_node(), and mesh::LooseOctree< NodeType >::get_statistics_recursive().
Octant* mesh::Octant< NodeType >::_parent |
Parent node
Definition at line 59 of file octant.h.
Referenced by mesh::Octant< NodeType >::dump(), and mesh::Octant< NodeType >::~Octant().