|
Geant4 11.4.0
Toolkit for the simulation of the passage of particles through matter
|
G4SmartVoxelNode defines a node in the smart voxel hierarchy, i.e. a 'slice' of space along a given axis between given minima and maxima. The node is not aware of its position - this information being available/derivable by the node's owner(s), the voxel headers. More...
#include <G4SmartVoxelNode.hh>
Public Member Functions | |
| G4SmartVoxelNode (G4int pSlice=0) | |
| ~G4SmartVoxelNode ()=default | |
| G4bool | operator== (const G4SmartVoxelNode &v) const |
| G4int | GetVolume (G4int pVolumeNo) const |
| void | Insert (G4int pVolumeNo) |
| std::size_t | GetNoContained () const |
| std::size_t | GetCapacity () const |
| void | Reserve (G4int noSlices) |
| void | Shrink () |
| G4int | GetMaxEquivalentSliceNo () const |
| void | SetMaxEquivalentSliceNo (G4int pMax) |
| G4int | GetMinEquivalentSliceNo () const |
| void | SetMinEquivalentSliceNo (G4int pMin) |
G4SmartVoxelNode defines a node in the smart voxel hierarchy, i.e. a 'slice' of space along a given axis between given minima and maxima. The node is not aware of its position - this information being available/derivable by the node's owner(s), the voxel headers.
Definition at line 64 of file G4SmartVoxelNode.hh.
|
inline |
Constructor for G4SmartVoxelNode. It creates an empty node with slice number 'pSlice'; this number is not stored, but used to provide defaults for the minimum and maximum equivalent node numbers.
| [in] | pSlice | Max & min equivalent slice numbers for the header. |
Referenced by operator==(), and ~G4SmartVoxelNode().
|
default |
Default destructor.
|
inline |
Returns the maximum capacity of the buffer.
|
inline |
Returns the maximum slice (node/header) number with the same contents and with all intermediate slice also having the same contents.
Referenced by G4VoxelSafety::SafetyForVoxelHeader().
|
inline |
Returns the minimum slice (node/header) number with the same contents and with all intermediate nodes also having the same contents.
Referenced by G4VoxelSafety::SafetyForVoxelHeader().
|
inline |
Returns the number of volumes inside the node.
Referenced by G4ParameterisedNavigation::ComputeSafety(), G4VoxelNavigation::ComputeSafety(), G4ParameterisedNavigation::ComputeStep(), G4VoxelNavigation::ComputeStep(), G4ParameterisedNavigation::LevelLocate(), operator==(), and G4VoxelSafety::SafetyForVoxelNode().
Returns the contained volume number 'pVolumeNo'. Note: starts from 0 and no bounds checking is performed.
Referenced by G4ParameterisedNavigation::ComputeSafety(), G4VoxelNavigation::ComputeSafety(), G4ParameterisedNavigation::ComputeStep(), G4VoxelNavigation::ComputeStep(), G4ParameterisedNavigation::LevelLocate(), operator==(), and G4VoxelSafety::SafetyForVoxelNode().
|
inline |
Adds the specified volume number 'pVolumeNo' to the contents.
| G4bool G4SmartVoxelNode::operator== | ( | const G4SmartVoxelNode & | v | ) | const |
Equality operator.
Definition at line 41 of file G4SmartVoxelNode.cc.
|
inline |
Reserves memory in the vector of slices according to the specified quantity, relative to the maximum number of slices.
|
inline |
Sets the maximum slice number (as above).
|
inline |
Sets the minimum slice number (as above).
|
inline |
Shrinks the buffer capacity to the actual size to reduce wasted memory.