Warning, file /include/Geant4/G4MultiUnion.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
0032
0033 inline G4Voxelizer& G4MultiUnion::GetVoxels() const
0034 {
0035 return (G4Voxelizer&)fVoxels;
0036 }
0037
0038 inline const G4Transform3D& G4MultiUnion::GetTransformation(G4int index) const
0039 {
0040 return fTransformObjs[index];
0041 }
0042
0043 inline G4VSolid* G4MultiUnion::GetSolid(G4int index) const
0044 {
0045 return fSolids[index];
0046 }
0047
0048 inline G4int G4MultiUnion::GetNumberOfSolids() const
0049 {
0050 return G4int(fSolids.size());
0051 }
0052
0053 inline void G4MultiUnion::SetAccurateSafety(G4bool flag)
0054 {
0055 fAccurate = flag;
0056 }
0057
0058 inline
0059 G4ThreeVector G4MultiUnion::GetLocalPoint(const G4Transform3D& trans,
0060 const G4ThreeVector& global) const
0061 {
0062
0063
0064
0065
0066 G4double px = global.x() - trans.dx();
0067 G4double py = global.y() - trans.dy();
0068 G4double pz = global.z() - trans.dz();
0069 G4double x = trans.xx()*px + trans.yx()*py + trans.zx()*pz;
0070 G4double y = trans.xy()*px + trans.yy()*py + trans.zy()*pz;
0071 G4double z = trans.xz()*px + trans.yz()*py + trans.zz()*pz;
0072 return { x, y, z };
0073 }
0074
0075 inline
0076 G4ThreeVector G4MultiUnion::GetLocalVector(const G4Transform3D& trans,
0077 const G4ThreeVector& global) const
0078 {
0079
0080
0081
0082
0083 G4double vx = global.x();
0084 G4double vy = global.y();
0085 G4double vz = global.z();
0086 G4double x = trans.xx()*vx + trans.yx()*vy + trans.zx()*vz;
0087 G4double y = trans.xy()*vx + trans.yy()*vy + trans.zy()*vz;
0088 G4double z = trans.xz()*vx + trans.yz()*vy + trans.zz()*vz;
0089 return { x, y, z };
0090 }
0091
0092 inline
0093 G4ThreeVector G4MultiUnion::GetGlobalPoint(const G4Transform3D& trans,
0094 const G4ThreeVector& local) const
0095 {
0096
0097
0098
0099
0100 G4double px = local.x();
0101 G4double py = local.y();
0102 G4double pz = local.z();
0103 G4double x = trans.xx()*px + trans.xy()*py + trans.xz()*pz + trans.dx();
0104 G4double y = trans.yx()*px + trans.yy()*py + trans.yz()*pz + trans.dy();
0105 G4double z = trans.zx()*px + trans.zy()*py + trans.zz()*pz + trans.dz();
0106 return { x, y, z };
0107 }
0108
0109 inline
0110 G4ThreeVector G4MultiUnion::GetGlobalVector(const G4Transform3D& trans,
0111 const G4ThreeVector& local) const
0112 {
0113
0114
0115
0116
0117 G4double vx = local.x();
0118 G4double vy = local.y();
0119 G4double vz = local.z();
0120 G4double x = trans.xx()*vx + trans.xy()*vy + trans.xz()*vz;
0121 G4double y = trans.yx()*vx + trans.yy()*vy + trans.yz()*vz;
0122 G4double z = trans.zx()*vx + trans.zy()*vy + trans.zz()*vz;
0123 return { x, y, z };
0124 }