Warning, file /include/Geant4/G4AssemblyTriplet.icc was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031 inline
0032 G4AssemblyTriplet::G4AssemblyTriplet()
0033 {
0034 G4ThreeVector v(0.,0.,0.);
0035 fTranslation = v;
0036 }
0037
0038 inline
0039 G4AssemblyTriplet::G4AssemblyTriplet( G4LogicalVolume* pVolume,
0040 G4ThreeVector& translation,
0041 G4RotationMatrix* pRotation,
0042 G4bool isReflection )
0043 : fVolume( pVolume ), fTranslation( translation ), fRotation( pRotation ),
0044 fIsReflection(isReflection)
0045 {
0046 }
0047
0048 inline
0049 G4AssemblyTriplet::G4AssemblyTriplet( G4AssemblyVolume* pAssembly,
0050 G4ThreeVector& translation,
0051 G4RotationMatrix* pRotation,
0052 G4bool isReflection )
0053 : fTranslation( translation ), fRotation( pRotation ),
0054 fAssembly( pAssembly ), fIsReflection(isReflection)
0055 {
0056 }
0057
0058 inline
0059 G4AssemblyTriplet::G4AssemblyTriplet( const G4AssemblyTriplet& scopy )
0060 {
0061 fVolume = scopy.GetVolume();
0062 fRotation = scopy.GetRotation();
0063 fTranslation = scopy.GetTranslation();
0064 fAssembly = scopy.GetAssembly();
0065 fIsReflection = scopy.IsReflection();
0066 }
0067
0068 inline
0069 G4AssemblyTriplet::~G4AssemblyTriplet() = default;
0070
0071 inline
0072 G4LogicalVolume* G4AssemblyTriplet::GetVolume() const
0073 {
0074 return fVolume;
0075 }
0076
0077 inline
0078 void G4AssemblyTriplet::SetVolume( G4LogicalVolume* pVolume )
0079 {
0080 if ( fAssembly != nullptr )
0081 {
0082 G4Exception("G4AssemblyTriplet::SetVolume()",
0083 "GeomVol1001", JustWarning,
0084 "There is an assembly already set, it will be ignored.");
0085 }
0086 fVolume = pVolume;
0087 fAssembly = nullptr;
0088 }
0089
0090 inline
0091 G4AssemblyVolume* G4AssemblyTriplet::GetAssembly() const
0092 {
0093 return fAssembly;
0094 }
0095
0096 inline
0097 void G4AssemblyTriplet::SetAssembly( G4AssemblyVolume* pAssembly )
0098 {
0099 if ( fVolume != nullptr )
0100 {
0101 G4Exception("G4AssemblyTriplet::SetAssembly()",
0102 "GeomVol1001", JustWarning,
0103 "There is a volume already set, it will be ignored.");
0104 }
0105 fAssembly = pAssembly;
0106 fVolume = nullptr;
0107 }
0108
0109 inline
0110 G4ThreeVector G4AssemblyTriplet::GetTranslation() const
0111 {
0112 return fTranslation;
0113 }
0114
0115 inline
0116 void G4AssemblyTriplet::SetTranslation( G4ThreeVector& translation )
0117 {
0118 fTranslation = translation;
0119 }
0120
0121 inline
0122 G4RotationMatrix* G4AssemblyTriplet::GetRotation() const
0123 {
0124 return fRotation;
0125 }
0126
0127 inline
0128 void G4AssemblyTriplet::SetRotation( G4RotationMatrix* pRotation )
0129 {
0130 fRotation = pRotation;
0131 }
0132
0133 inline
0134 G4bool G4AssemblyTriplet::IsReflection() const
0135 {
0136 return fIsReflection;
0137 }
0138
0139 inline
0140 G4AssemblyTriplet&
0141 G4AssemblyTriplet::operator=( const G4AssemblyTriplet& scopy )
0142 {
0143 if( this != &scopy )
0144 {
0145 fVolume = scopy.GetVolume();
0146 fRotation = scopy.GetRotation();
0147 fTranslation = scopy.GetTranslation();
0148 fAssembly = scopy.GetAssembly();
0149 fIsReflection = scopy.IsReflection();
0150 }
0151
0152 return *this;
0153 }