Geant4 11.1.1
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 69 of file G4RayTracerSceneHandler.cc.

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

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