Geant4  10.02.p03
G4SurfaceVoxelizer::G4VoxelComparator Class Reference
Collaboration diagram for G4SurfaceVoxelizer::G4VoxelComparator:

Public Member Functions

 G4VoxelComparator (std::vector< G4VoxelInfo > &voxels)
 
G4bool operator() (const G4int &l, const G4int &r) const
 

Public Attributes

std::vector< G4VoxelInfo > & fVoxels
 

Detailed Description

Definition at line 164 of file G4SurfaceVoxelizer.hh.

Constructor & Destructor Documentation

◆ G4VoxelComparator()

G4SurfaceVoxelizer::G4VoxelComparator::G4VoxelComparator ( std::vector< G4VoxelInfo > &  voxels)
inline

Definition at line 170 of file G4SurfaceVoxelizer.hh.

170 : fVoxels(voxels) {}
std::vector< G4VoxelInfo > & fVoxels

Member Function Documentation

◆ operator()()

G4bool G4SurfaceVoxelizer::G4VoxelComparator::operator() ( const G4int l,
const G4int r 
) const
inline

Definition at line 172 of file G4SurfaceVoxelizer.hh.

173  {
174  G4VoxelInfo &lv = fVoxels[l], &rv = fVoxels[r];
175  G4int left = lv.count + fVoxels[lv.next].count;
176  G4int right = rv.count + fVoxels[rv.next].count;
177  return (left == right) ? l < r : left < right;
178  }
std::vector< G4VoxelInfo > & fVoxels
int G4int
Definition: G4Types.hh:78

Member Data Documentation

◆ fVoxels

std::vector<G4VoxelInfo>& G4SurfaceVoxelizer::G4VoxelComparator::fVoxels

Definition at line 168 of file G4SurfaceVoxelizer.hh.


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