Geant4-11
Public Member Functions | Data Fields
G4OpenInventorQtExaminerViewer::elementForSorting Struct Reference

#include <G4OpenInventorQtExaminerViewer.hh>

Public Member Functions

G4bool operator< (elementForSorting const &other) const
 

Data Fields

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

Detailed Description

Definition at line 336 of file G4OpenInventorQtExaminerViewer.hh.

Member Function Documentation

◆ operator<()

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

Definition at line 343 of file G4OpenInventorQtExaminerViewer.hh.

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

References closestPointZCoord, and distanceToBeamlineStart.

Field Documentation

◆ closestPoint

SbVec3f G4OpenInventorQtExaminerViewer::elementForSorting::closestPoint

◆ closestPointZCoord

float G4OpenInventorQtExaminerViewer::elementForSorting::closestPointZCoord

◆ distanceToBeamlineStart

float G4OpenInventorQtExaminerViewer::elementForSorting::distanceToBeamlineStart

◆ name

std::string G4OpenInventorQtExaminerViewer::elementForSorting::name

◆ smallestDistance

float G4OpenInventorQtExaminerViewer::elementForSorting::smallestDistance

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