Geant4 11.2.2
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4KDNode< PointT > Class Template Reference

#include <G4KDNode.hh>

+ Inheritance diagram for G4KDNode< PointT >:

Public Member Functions

 G4KDNode (G4KDTree *, PointT *, G4KDNode_Base *)
 
 ~G4KDNode () override
 
void * operator new (std::size_t)
 
void operator delete (void *)
 
PointT * GetPoint ()
 
G4double operator[] (std::size_t i) const override
 
void InactiveNode () override
 
G4bool IsValid () const override
 
 ~G4KDNode ()
 
 ~G4KDNode ()
 
 ~G4KDNode ()
 
 ~G4KDNode ()
 
- Public Member Functions inherited from G4KDNode_Base
 G4KDNode_Base (G4KDTree *, G4KDNode_Base *)
 
virtual ~G4KDNode_Base ()
 
G4KDTreeGetTree () const
 
void SetTree (G4KDTree *tree)
 
G4int GetDim () const
 
G4int GetAxis () const
 
G4KDNode_BaseGetParent ()
 
G4KDNode_BaseGetLeft ()
 
G4KDNode_BaseGetRight ()
 
template<typename Position >
G4KDNode_BaseFindParent (const Position &x0)
 
template<typename PointT >
G4KDNode_BaseInsert (PointT *point)
 
template<typename PointT >
G4KDNode_BaseInsert (const PointT &point)
 
G4int Insert (G4KDNode_Base *newNode)
 
void PullSubTree ()
 
void RetrieveNodeList (std::list< G4KDNode_Base * > &node_list)
 
void Print (std::ostream &out, G4int level=0) const
 

Protected Attributes

PointT * fPoint
 
G4bool fValid
 
- Protected Attributes inherited from G4KDNode_Base
std::size_t fAxis
 
G4int fSide
 
G4KDTreefTree {nullptr}
 
G4KDNode_BasefLeft {nullptr}
 
G4KDNode_BasefRight {nullptr}
 
G4KDNode_BasefParent {nullptr}
 

Detailed Description

template<typename PointT>
class G4KDNode< PointT >

G4KDNode stores one entity in G4KDTree This class is for internal use only

Definition at line 132 of file G4KDNode.hh.

Constructor & Destructor Documentation

◆ G4KDNode()

template<typename PointT >
G4KDNode< PointT >::G4KDNode ( G4KDTree * ,
PointT * ,
G4KDNode_Base *  )

◆ ~G4KDNode() [1/5]

template<typename PointT >
G4KDNode< PointT >::~G4KDNode ( )
override

◆ ~G4KDNode() [2/5]

◆ ~G4KDNode() [3/5]

Definition at line 59 of file G4IT.cc.

59 {
60 fPoint->SetNode(nullptr);
61}
PointT * fPoint
Definition G4KDNode.hh:167

◆ ~G4KDNode() [4/5]

◆ ~G4KDNode() [5/5]

Definition at line 68 of file G4Molecule.cc.

68 {
69 fPoint->SetNode(nullptr);
70}

Member Function Documentation

◆ GetPoint()

template<typename PointT >
PointT * G4KDNode< PointT >::GetPoint ( )
inline

Definition at line 144 of file G4KDNode.hh.

145 {
146 return fPoint;
147 }

◆ InactiveNode()

template<typename PointT >
void G4KDNode< PointT >::InactiveNode ( )
inlineoverridevirtual

Reimplemented from G4KDNode_Base.

Definition at line 155 of file G4KDNode.hh.

156 {
157 fValid = false;
159 }
virtual void InactiveNode()
Definition G4KDNode.cc:103
G4bool fValid
Definition G4KDNode.hh:168

◆ IsValid()

template<typename PointT >
G4bool G4KDNode< PointT >::IsValid ( ) const
inlineoverridevirtual

Reimplemented from G4KDNode_Base.

Definition at line 161 of file G4KDNode.hh.

162 {
163 return fValid;
164 }

◆ operator delete()

template<typename PointT >
void G4KDNode< PointT >::operator delete ( void * aNode)

Definition at line 189 of file G4KDNode.hh.

190 {
191 fgAllocator->FreeSingle((G4KDNode<PointT> *) aNode);
192 }
void FreeSingle(Type *anElement)

◆ operator new()

template<typename PointT >
void * G4KDNode< PointT >::operator new ( std::size_t )

Definition at line 182 of file G4KDNode.hh.

183 {
184 if(!fgAllocator) fgAllocator = new G4Allocator<G4KDNode<PointT> >;
185 return (void *) fgAllocator->MallocSingle();
186 }
Type * MallocSingle()

◆ operator[]()

template<typename PointT >
G4double G4KDNode< PointT >::operator[] ( std::size_t i) const
inlineoverridevirtual

Implements G4KDNode_Base.

Definition at line 149 of file G4KDNode.hh.

150 {
151 if(fPoint == nullptr) abort();
152 return (*fPoint)[(G4int)i];
153 }
int G4int
Definition G4Types.hh:85

Member Data Documentation

◆ fPoint

template<typename PointT >
PointT* G4KDNode< PointT >::fPoint
protected

Definition at line 167 of file G4KDNode.hh.

Referenced by G4KDNode< PointT >::GetPoint(), and G4KDNode< PointT >::operator[]().

◆ fValid

template<typename PointT >
G4bool G4KDNode< PointT >::fValid
protected

Definition at line 168 of file G4KDNode.hh.

Referenced by G4KDNode< PointT >::InactiveNode(), and G4KDNode< PointT >::IsValid().


The documentation for this class was generated from the following file: