Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
|
#include <G4KDTree.hh>
Public Member Functions | |
G4KDTree (int dim=3) | |
virtual | ~G4KDTree () |
void | Clear () |
int | GetDim () |
void | SetDataDestructor (void(*fDestr)(void *)) |
int | GetNbNodes () |
G4KDNode * | GetRoot () |
G4KDNode * | Insert (const double *pos, void *data) |
G4KDNode * | Insert (const double &x, const double &y, const double &z, void *data) |
G4KDTreeResultHandle | Nearest (const double *pos) |
G4KDTreeResultHandle | Nearest (const double &x, const double &y, const double &z) |
G4KDTreeResultHandle | Nearest (G4KDNode *node) |
G4KDTreeResultHandle | NearestInRange (const double *pos, const double &range) |
G4KDTreeResultHandle | NearestInRange (const double &x, const double &y, const double &z, const double &range) |
G4KDTreeResultHandle | NearestInRange (G4KDNode *node, const double &range) |
Protected Member Functions | |
void | __Clear_Rec (G4KDNode *node) |
int | __NearestInRange (G4KDNode *node, const double *pos, const double &range_sq, const double &range, G4KDTreeResult &list, int ordered, G4KDNode *source_node=0) |
void | __NearestToPosition (G4KDNode *node, const double *pos, G4KDNode *&result, double *result_dist_sq, struct HyperRect *fRect) |
void | __NearestToNode (G4KDNode *source_node, G4KDNode *node, const double *pos, std::vector< G4KDNode * > &result, double *result_dist_sq, struct HyperRect *fRect, int &nbresult) |
Protected Attributes | |
G4KDNode * | fRoot |
Friends | |
class | G4KDNode |
G4KDTree is used by the ITManager to locate the neareast neighbours. A kdtree sorts out node in such a way that it reduces the number of node check. The results of this search can be retrieved by G4KDTreeResultHandle.
Definition at line 60 of file G4KDTree.hh.
G4KDTree::G4KDTree | ( | int | dim = 3 | ) |
Definition at line 169 of file G4KDTree.cc.
|
virtual |
Definition at line 178 of file G4KDTree.cc.
|
protected |
Definition at line 203 of file G4KDTree.cc.
Referenced by __Clear_Rec(), Clear(), and ~G4KDTree().
|
protected |
Definition at line 261 of file G4KDTree.cc.
Referenced by __NearestInRange(), and NearestInRange().
|
protected |
Definition at line 420 of file G4KDTree.cc.
Referenced by __NearestToNode(), and Nearest().
|
protected |
Definition at line 308 of file G4KDTree.cc.
Referenced by __NearestToPosition(), and Nearest().
void G4KDTree::Clear | ( | ) |
Definition at line 190 of file G4KDTree.cc.
|
inline |
Definition at line 136 of file G4KDTree.hh.
Referenced by G4KDNode::GetDim(), and G4KDTreeResult::GetItem().
|
inline |
Definition at line 80 of file G4KDTree.hh.
|
inline |
Definition at line 81 of file G4KDTree.hh.
Definition at line 251 of file G4KDTree.cc.
Definition at line 221 of file G4KDTree.cc.
Referenced by Insert().
G4KDTreeResultHandle G4KDTree::Nearest | ( | const double & | x, |
const double & | y, | ||
const double & | z | ||
) |
Definition at line 552 of file G4KDTree.cc.
G4KDTreeResultHandle G4KDTree::Nearest | ( | const double * | pos | ) |
Definition at line 386 of file G4KDTree.cc.
Referenced by Nearest().
G4KDTreeResultHandle G4KDTree::Nearest | ( | G4KDNode * | node | ) |
Definition at line 508 of file G4KDTree.cc.
G4KDTreeResultHandle G4KDTree::NearestInRange | ( | const double & | x, |
const double & | y, | ||
const double & | z, | ||
const double & | range | ||
) |
Definition at line 578 of file G4KDTree.cc.
G4KDTreeResultHandle G4KDTree::NearestInRange | ( | const double * | pos, |
const double & | range | ||
) |
Definition at line 561 of file G4KDTree.cc.
Referenced by NearestInRange().
G4KDTreeResultHandle G4KDTree::NearestInRange | ( | G4KDNode * | node, |
const double & | range | ||
) |
Definition at line 590 of file G4KDTree.cc.
|
inline |
Definition at line 141 of file G4KDTree.hh.
|
friend |
Definition at line 62 of file G4KDTree.hh.
Referenced by Insert().
|
protected |
Definition at line 69 of file G4KDTree.hh.
Referenced by Clear(), G4KDTree(), GetRoot(), Insert(), Nearest(), NearestInRange(), and ~G4KDTree().