G4SmartVoxelNode Class Reference

#include <G4SmartVoxelNode.hh>


Public Member Functions

 G4SmartVoxelNode (G4int pSlice=0)
 ~G4SmartVoxelNode ()
G4int GetVolume (G4int pVolumeNo) const
void Insert (G4int pVolumeNo)
G4int GetNoContained () const
G4int GetCapacity () const
void Reserve (G4int noSlices)
void Shrink ()
G4int GetMaxEquivalentSliceNo () const
void SetMaxEquivalentSliceNo (G4int pMax)
G4int GetMinEquivalentSliceNo () const
void SetMinEquivalentSliceNo (G4int pMin)
G4bool operator== (const G4SmartVoxelNode &v) const


Detailed Description

Definition at line 59 of file G4SmartVoxelNode.hh.


Constructor & Destructor Documentation

G4SmartVoxelNode::G4SmartVoxelNode ( G4int  pSlice = 0  )  [inline]

Definition at line 63 of file G4SmartVoxelNode.hh.

00063                                      : fminEquivalent(pSlice),
00064                                        fmaxEquivalent(pSlice) {}

G4SmartVoxelNode::~G4SmartVoxelNode (  ) 

Definition at line 39 of file G4SmartVoxelNode.cc.

00040 {
00041 }


Member Function Documentation

G4int G4SmartVoxelNode::GetCapacity (  )  const [inline]

Definition at line 53 of file G4SmartVoxelNode.icc.

00054 {
00055   return fcontents.capacity();
00056 }

G4int G4SmartVoxelNode::GetMaxEquivalentSliceNo (  )  const [inline]

Definition at line 71 of file G4SmartVoxelNode.icc.

Referenced by G4SmartVoxelHeader::CollectEquivalentNodes(), G4VoxelNavigation::ComputeVoxelSafety(), G4VoxelNavigation::LocateNextVoxel(), G4SmartVoxelHeader::RefineNodes(), and G4VoxelSafety::SafetyForVoxelHeader().

00072 {
00073   return fmaxEquivalent;
00074 }

G4int G4SmartVoxelNode::GetMinEquivalentSliceNo (  )  const [inline]

Definition at line 83 of file G4SmartVoxelNode.icc.

Referenced by G4VoxelNavigation::ComputeVoxelSafety(), G4VoxelNavigation::LocateNextVoxel(), G4SmartVoxelHeader::RefineNodes(), and G4VoxelSafety::SafetyForVoxelHeader().

00084 {
00085   return fminEquivalent;
00086 }

G4int G4SmartVoxelNode::GetNoContained (  )  const [inline]

Definition at line 47 of file G4SmartVoxelNode.icc.

Referenced by G4SmartVoxelHeader::CalculateQuality(), G4VoxelNavigation::ComputeSafety(), G4ParameterisedNavigation::ComputeSafety(), G4VoxelNavigation::ComputeStep(), G4ParameterisedNavigation::ComputeStep(), G4VoxelNavigation::LevelLocate(), G4ParameterisedNavigation::LevelLocate(), operator==(), G4SmartVoxelHeader::RefineNodes(), and G4VoxelSafety::SafetyForVoxelNode().

00048 {
00049   return fcontents.size();
00050 }

G4int G4SmartVoxelNode::GetVolume ( G4int  pVolumeNo  )  const [inline]

Definition at line 35 of file G4SmartVoxelNode.icc.

Referenced by G4VoxelNavigation::ComputeSafety(), G4ParameterisedNavigation::ComputeSafety(), G4VoxelNavigation::ComputeStep(), G4ParameterisedNavigation::ComputeStep(), G4VoxelNavigation::LevelLocate(), G4ParameterisedNavigation::LevelLocate(), operator==(), G4SmartVoxelHeader::RefineNodes(), and G4VoxelSafety::SafetyForVoxelNode().

00036 {
00037   return fcontents[pVolumeNo];
00038 }

void G4SmartVoxelNode::Insert ( G4int  pVolumeNo  )  [inline]

Definition at line 41 of file G4SmartVoxelNode.icc.

00042 {
00043   fcontents.push_back(pVolumeNo);
00044 }

G4bool G4SmartVoxelNode::operator== ( const G4SmartVoxelNode v  )  const

Definition at line 48 of file G4SmartVoxelNode.cc.

References GetNoContained(), and GetVolume().

00049 {
00050   G4int maxNode=GetNoContained();
00051   if (maxNode==v.GetNoContained())
00052   {
00053     for (G4int node=0;node<maxNode;node++)
00054     {
00055       if (GetVolume(node)!=v.GetVolume(node))
00056       {
00057         return false;
00058       }
00059     }
00060     return true;
00061   }
00062   return false;
00063 }

void G4SmartVoxelNode::Reserve ( G4int  noSlices  )  [inline]

Definition at line 59 of file G4SmartVoxelNode.icc.

00060 {
00061   fcontents.reserve(noSlices);
00062 }

void G4SmartVoxelNode::SetMaxEquivalentSliceNo ( G4int  pMax  )  [inline]

Definition at line 77 of file G4SmartVoxelNode.icc.

Referenced by G4SmartVoxelHeader::BuildEquivalentSliceNos().

00078 {
00079   fmaxEquivalent=pMax;
00080 }

void G4SmartVoxelNode::SetMinEquivalentSliceNo ( G4int  pMin  )  [inline]

Definition at line 89 of file G4SmartVoxelNode.icc.

Referenced by G4SmartVoxelHeader::BuildEquivalentSliceNos().

00090 {
00091   fminEquivalent=pMin;
00092 }

void G4SmartVoxelNode::Shrink (  )  [inline]

Definition at line 65 of file G4SmartVoxelNode.icc.

00066 {
00067   G4SliceVector(fcontents).swap(fcontents);
00068 }


The documentation for this class was generated from the following files:
Generated on Mon May 27 17:53:24 2013 for Geant4 by  doxygen 1.4.7