Geant4 11.2.2
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4OpenInventorQtExaminerViewer::elementForSorting Struct Reference

#include <G4OpenInventorQtExaminerViewer.hh>

Public Member Functions

G4bool operator< (elementForSorting const &other) const
 

Public Attributes

float closestPointZCoord
 
SbVec3f closestPoint
 
float smallestDistance
 
float distanceToBeamlineStart
 
std::string name
 

Detailed Description

Definition at line 339 of file G4OpenInventorQtExaminerViewer.hh.

Member Function Documentation

◆ operator<()

G4bool G4OpenInventorQtExaminerViewer::elementForSorting::operator< ( elementForSorting const & other) const
inline

Definition at line 346 of file G4OpenInventorQtExaminerViewer.hh.

347 {
348 if (closestPointZCoord < other.closestPointZCoord)
349 return true;
350 if (closestPointZCoord > other.closestPointZCoord)
351 return false;
352
353 // otherwise closestPointZCoord == other.closestPointZCoord.
354 // Compare the distances from the center of the element to
355 // the start of the beamline.
356 if (distanceToBeamlineStart < other.distanceToBeamlineStart)
357 return true;
358 if (distanceToBeamlineStart > other.distanceToBeamlineStart)
359 return false;
360
361 // In case both closestPointZCoord and smallestDistance are
362 // equal, we have two exactly overlapping elements, if so
363 // the order doesn't matter
364 return true;
365 }

Member Data Documentation

◆ closestPoint

SbVec3f G4OpenInventorQtExaminerViewer::elementForSorting::closestPoint

◆ closestPointZCoord

float G4OpenInventorQtExaminerViewer::elementForSorting::closestPointZCoord

◆ distanceToBeamlineStart

float G4OpenInventorQtExaminerViewer::elementForSorting::distanceToBeamlineStart

◆ name

std::string G4OpenInventorQtExaminerViewer::elementForSorting::name

Definition at line 344 of file G4OpenInventorQtExaminerViewer.hh.

◆ smallestDistance

float G4OpenInventorQtExaminerViewer::elementForSorting::smallestDistance

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