Geant4-11
Public Member Functions | Data Fields | Friends
G4Voxel::Index Struct Reference

#include <G4DNAMesh.hh>

Public Member Functions

 Index ()
 
 Index (int x0, int y0, int z0)
 
G4bool operator!= (const Index &rhs) const
 
Index operator+ (const Index &rhs) const
 
G4bool operator== (const Index &rhs) const
 

Data Fields

int x
 
int y
 
int z
 

Friends

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

Detailed Description

Definition at line 44 of file G4DNAMesh.hh.

Constructor & Destructor Documentation

◆ Index() [1/2]

G4Voxel::Index::Index ( )
inline

Definition at line 46 of file G4DNAMesh.hh.

47 : x(0)
48 , y(0)
49 , z(0)
50 {}

◆ Index() [2/2]

G4Voxel::Index::Index ( int  x0,
int  y0,
int  z0 
)
inline

Definition at line 51 of file G4DNAMesh.hh.

52 : x(x0)
53 , y(y0)
54 , z(z0)
55 {}

Member Function Documentation

◆ operator!=()

G4bool G4Voxel::Index::operator!= ( const Index rhs) const
inline

Definition at line 66 of file G4DNAMesh.hh.

67 {
68 return x != rhs.x || y != rhs.y || z != rhs.z;
69 }

References x, y, and z.

◆ operator+()

Index G4Voxel::Index::operator+ ( const Index rhs) const
inline

Definition at line 70 of file G4DNAMesh.hh.

71 {
72 return { x + rhs.x, y + rhs.y, z + rhs.z };
73 }

References x, y, and z.

◆ operator==()

G4bool G4Voxel::Index::operator== ( const Index rhs) const
inline

Definition at line 62 of file G4DNAMesh.hh.

63 {
64 return x == rhs.x && y == rhs.y && z == rhs.z;
65 }

References x, y, and z.

Friends And Related Function Documentation

◆ operator<<

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

Definition at line 57 of file G4DNAMesh.hh.

58 {
59 stream << "(" << rhs.x << ", " << rhs.y << ", " << rhs.z << ")";
60 return stream;
61 }

Field Documentation

◆ x

int G4Voxel::Index::x

◆ y

int G4Voxel::Index::y

◆ z

int G4Voxel::Index::z

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