00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034 inline
00035 G4AssemblyTriplet::G4AssemblyTriplet()
00036 : fVolume( 0 ), fRotation( 0 ), fAssembly(0), fIsReflection(false)
00037 {
00038 G4ThreeVector v(0.,0.,0.);
00039 fTranslation = v;
00040 }
00041
00042 inline
00043 G4AssemblyTriplet::G4AssemblyTriplet( G4LogicalVolume* pVolume,
00044 G4ThreeVector& translation,
00045 G4RotationMatrix* pRotation,
00046 G4bool isReflection )
00047 : fVolume( pVolume ), fTranslation( translation ), fRotation( pRotation ),
00048 fAssembly( 0 ), fIsReflection(isReflection)
00049 {
00050 }
00051
00052 inline
00053 G4AssemblyTriplet::G4AssemblyTriplet( G4AssemblyVolume* pAssembly,
00054 G4ThreeVector& translation,
00055 G4RotationMatrix* pRotation,
00056 G4bool isReflection )
00057 : fVolume( 0 ), fTranslation( translation ), fRotation( pRotation ),
00058 fAssembly( pAssembly ), fIsReflection(isReflection)
00059 {
00060 }
00061
00062 inline
00063 G4AssemblyTriplet::G4AssemblyTriplet( const G4AssemblyTriplet& scopy )
00064 {
00065 fVolume = scopy.GetVolume();
00066 fRotation = scopy.GetRotation();
00067 fTranslation = scopy.GetTranslation();
00068 fAssembly = scopy.GetAssembly();
00069 fIsReflection = scopy.IsReflection();
00070 }
00071
00072 inline
00073 G4AssemblyTriplet::~G4AssemblyTriplet()
00074 {
00075 }
00076
00077 inline
00078 G4LogicalVolume* G4AssemblyTriplet::GetVolume() const
00079 {
00080 return fVolume;
00081 }
00082
00083 inline
00084 void G4AssemblyTriplet::SetVolume( G4LogicalVolume* pVolume )
00085 {
00086 if ( fAssembly )
00087 {
00088 G4Exception("G4AssemblyTriplet::SetVolume()",
00089 "GeomVol1001", JustWarning,
00090 "There is an assembly already set, it will be ignored.");
00091 }
00092 fVolume = pVolume;
00093 fAssembly = 0;
00094 }
00095
00096 inline
00097 G4AssemblyVolume* G4AssemblyTriplet::GetAssembly() const
00098 {
00099 return fAssembly;
00100 }
00101
00102 inline
00103 void G4AssemblyTriplet::SetAssembly( G4AssemblyVolume* pAssembly )
00104 {
00105 if ( fVolume )
00106 {
00107 G4Exception("G4AssemblyTriplet::SetAssembly()",
00108 "GeomVol1001", JustWarning,
00109 "There is a volume already set, it will be ignored.");
00110 }
00111 fAssembly = pAssembly;
00112 fVolume = 0;
00113 }
00114
00115 inline
00116 G4ThreeVector G4AssemblyTriplet::GetTranslation() const
00117 {
00118 return fTranslation;
00119 }
00120
00121 inline
00122 void G4AssemblyTriplet::SetTranslation( G4ThreeVector& translation )
00123 {
00124 fTranslation = translation;
00125 }
00126
00127 inline
00128 G4RotationMatrix* G4AssemblyTriplet::GetRotation() const
00129 {
00130 return fRotation;
00131 }
00132
00133 inline
00134 void G4AssemblyTriplet::SetRotation( G4RotationMatrix* pRotation )
00135 {
00136 fRotation = pRotation;
00137 }
00138
00139 inline
00140 G4bool G4AssemblyTriplet::IsReflection() const
00141 {
00142 return fIsReflection;
00143 }
00144
00145 inline
00146 G4AssemblyTriplet&
00147 G4AssemblyTriplet::operator=( const G4AssemblyTriplet& scopy )
00148 {
00149 if( this != &scopy )
00150 {
00151 fVolume = scopy.GetVolume();
00152 fRotation = scopy.GetRotation();
00153 fTranslation = scopy.GetTranslation();
00154 fAssembly = scopy.GetAssembly();
00155 fIsReflection = scopy.IsReflection();
00156 }
00157
00158 return *this;
00159 }