Geant4 10.7.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4RayTracerSceneHandler::PathLessThan Struct Reference

#include <G4RayTracerSceneHandler.hh>

Public Member Functions

G4bool operator() (const G4ModelingParameters::PVPointerCopyNoPath &, const G4ModelingParameters::PVPointerCopyNoPath &) const
 

Detailed Description

Definition at line 63 of file G4RayTracerSceneHandler.hh.

Member Function Documentation

◆ operator()()

G4bool G4RayTracerSceneHandler::PathLessThan::operator() ( const G4ModelingParameters::PVPointerCopyNoPath a,
const G4ModelingParameters::PVPointerCopyNoPath b 
) const

Definition at line 68 of file G4RayTracerSceneHandler.cc.

71{
72 if (a.size() != b.size()) return a.size() < b.size();
73 auto ia = a.begin();
74 auto ib = b.begin();
75 for (; ia != a.end(); ++ia, ++ib) {
76 if (ia->GetPVPointer() < ib->GetPVPointer()) return true;
77 if (ia->GetPVPointer() > ib->GetPVPointer()) return false;
78 // Pointers equal
79 if (ia->GetCopyNo() < ib->GetCopyNo()) return true;
80 if (ia->GetCopyNo() > ib->GetCopyNo()) return false;
81 // Both pointers and copy no are equal - continue
82 }
83 // Equality
84 return false;
85}

The documentation for this struct was generated from the following files: