Geant4 11.1.1
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 337 of file G4OpenInventorQtExaminerViewer.hh.

Member Function Documentation

◆ operator<()

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

Definition at line 344 of file G4OpenInventorQtExaminerViewer.hh.

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

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 342 of file G4OpenInventorQtExaminerViewer.hh.

◆ smallestDistance

float G4OpenInventorQtExaminerViewer::elementForSorting::smallestDistance

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