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

#include <G4KDNode.hh>

+ Inheritance diagram for G4KDNodeCopy< PointCopyT >:

Public Member Functions

 G4KDNodeCopy (G4KDTree *tree, const PointCopyT &point, G4KDNode_Base *parent)
 
 ~G4KDNodeCopy () override=default
 
void * operator new (std::size_t)
 
void operator delete (void *aNode)
 
const PointCopyT & GetPoint ()
 
double operator[] (std::size_t i) const override
 
void InactiveNode () override
 
bool IsValid () const override
 
- 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

PointCopyT 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 PointCopyT>
class G4KDNodeCopy< PointCopyT >

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

Definition at line 200 of file G4KDNode.hh.

Constructor & Destructor Documentation

◆ G4KDNodeCopy()

template<typename PointCopyT >
G4KDNodeCopy< PointCopyT >::G4KDNodeCopy ( G4KDTree * tree,
const PointCopyT & point,
G4KDNode_Base * parent )
inline

Definition at line 206 of file G4KDNode.hh.

208 :
209 G4KDNode_Base(tree, parent)
210 {
211 fPoint = point;
212 fValid = true;
213 }
PointCopyT fPoint
Definition G4KDNode.hh:250
G4bool fValid
Definition G4KDNode.hh:251
G4KDNode_Base(G4KDTree *, G4KDNode_Base *)
Definition G4KDNode.cc:71

◆ ~G4KDNodeCopy()

template<typename PointCopyT >
G4KDNodeCopy< PointCopyT >::~G4KDNodeCopy ( )
overridedefault

Member Function Documentation

◆ GetPoint()

template<typename PointCopyT >
const PointCopyT & G4KDNodeCopy< PointCopyT >::GetPoint ( )
inline

Definition at line 228 of file G4KDNode.hh.

229 {
230 return fPoint;
231 }

◆ InactiveNode()

template<typename PointCopyT >
void G4KDNodeCopy< PointCopyT >::InactiveNode ( )
inlineoverridevirtual

Reimplemented from G4KDNode_Base.

Definition at line 238 of file G4KDNode.hh.

239 {
240 fValid = false;
242 }
virtual void InactiveNode()
Definition G4KDNode.cc:103

◆ IsValid()

template<typename PointCopyT >
bool G4KDNodeCopy< PointCopyT >::IsValid ( ) const
inlineoverridevirtual

Reimplemented from G4KDNode_Base.

Definition at line 244 of file G4KDNode.hh.

245 {
246 return fValid;
247 }

◆ operator delete()

template<typename PointCopyT >
void G4KDNodeCopy< PointCopyT >::operator delete ( void * aNode)
inline

Definition at line 223 of file G4KDNode.hh.

224 {
225 fgAllocator->FreeSingle((G4KDNodeCopy<PointCopyT>*) aNode);
226 }
void FreeSingle(Type *anElement)

◆ operator new()

template<typename PointCopyT >
void * G4KDNodeCopy< PointCopyT >::operator new ( std::size_t )
inline

Definition at line 217 of file G4KDNode.hh.

218 {
219 if(!fgAllocator) fgAllocator = new G4Allocator<G4KDNodeCopy<PointCopyT>>;
220 return (void *) fgAllocator->MallocSingle();
221 }
Type * MallocSingle()

◆ operator[]()

template<typename PointCopyT >
double G4KDNodeCopy< PointCopyT >::operator[] ( std::size_t i) const
inlineoverridevirtual

Implements G4KDNode_Base.

Definition at line 233 of file G4KDNode.hh.

234 {
235 return fPoint[i];
236 }

Member Data Documentation

◆ fPoint

template<typename PointCopyT >
PointCopyT G4KDNodeCopy< PointCopyT >::fPoint
protected

◆ fValid

template<typename PointCopyT >
G4bool G4KDNodeCopy< PointCopyT >::fValid
protected

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