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

#include <G4VDNAMesh.hh>

Public Member Functions

 Index ()=default
 
 Index (G4int _x, G4int _y, G4int _z)
 
 ~Index ()=default
 
G4bool operator== (const Index &rhs) const
 
G4bool operator!= (const Index &rhs) const
 
G4bool operator< (const Index &rhs) const
 

Public Attributes

G4int x = 0
 
G4int y = 0
 
G4int z = 0
 

Friends

std::ostream & operator<< (std::ostream &s, const Index &rhs)
 

Detailed Description

Definition at line 37 of file G4VDNAMesh.hh.

Constructor & Destructor Documentation

◆ Index() [1/2]

G4VDNAMesh::Index::Index ( )
default

◆ Index() [2/2]

G4VDNAMesh::Index::Index ( G4int _x,
G4int _y,
G4int _z )
inline

Definition at line 40 of file G4VDNAMesh.hh.

41 : x(_x)
42 , y(_y)
43 , z(_z)
44 {}

◆ ~Index()

G4VDNAMesh::Index::~Index ( )
default

Member Function Documentation

◆ operator!=()

G4bool G4VDNAMesh::Index::operator!= ( const Index & rhs) const
inline

Definition at line 50 of file G4VDNAMesh.hh.

51 {
52 return x != rhs.x || y != rhs.y || z != rhs.z;
53 }

◆ operator<()

G4bool G4VDNAMesh::Index::operator< ( const Index & rhs) const
inline

Definition at line 54 of file G4VDNAMesh.hh.

55 {
56 if(x != rhs.x)
57 {
58 return x < rhs.x;
59 }
60 if(y != rhs.y)
61 {
62 return y < rhs.y;
63 }
64 if(z != rhs.z)
65 {
66 return z < rhs.z;
67 }
68
69 return false;
70 }

◆ operator==()

G4bool G4VDNAMesh::Index::operator== ( const Index & rhs) const
inline

Definition at line 46 of file G4VDNAMesh.hh.

47 {
48 return x == rhs.x && y == rhs.y && z == rhs.z;
49 }

Friends And Related Symbol Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream & s,
const Index & rhs )
friend

Definition at line 30 of file G4DNAMesh.cc.

31{
32 stream << "{" << rhs.x << ", " << rhs.y << ", " << rhs.z << "}";
33 return stream;
34}

Member Data Documentation

◆ x

◆ y

◆ z


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