File indexing completed on 2025-01-18 09:59:17
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
0034 #ifndef G4UNIONSOLID_HH
0035 #define G4UNIONSOLID_HH
0036
0037 #include "G4BooleanSolid.hh"
0038 #include "G4VSolid.hh"
0039
0040 #include "G4RotationMatrix.hh"
0041 #include "G4ThreeVector.hh"
0042 #include "G4Transform3D.hh"
0043 #include "G4AffineTransform.hh"
0044
0045 class G4UnionSolid : public G4BooleanSolid
0046 {
0047 public:
0048
0049 G4UnionSolid( const G4String& pName,
0050 G4VSolid* pSolidA ,
0051 G4VSolid* pSolidB ) ;
0052
0053 G4UnionSolid( const G4String& pName,
0054 G4VSolid* pSolidA ,
0055 G4VSolid* pSolidB ,
0056 G4RotationMatrix* rotMatrix,
0057 const G4ThreeVector& transVector ) ;
0058
0059 G4UnionSolid( const G4String& pName,
0060 G4VSolid* pSolidA ,
0061 G4VSolid* pSolidB ,
0062 const G4Transform3D& transform ) ;
0063
0064 ~G4UnionSolid() override ;
0065
0066 G4GeometryType GetEntityType() const override ;
0067
0068 G4VSolid* Clone() const override;
0069
0070 G4UnionSolid(__void__&);
0071
0072
0073
0074
0075 G4UnionSolid(const G4UnionSolid& rhs);
0076 G4UnionSolid& operator=(const G4UnionSolid& rhs);
0077
0078
0079 void BoundingLimits(G4ThreeVector& pMin, G4ThreeVector& pMax) const override;
0080
0081 G4bool CalculateExtent( const EAxis pAxis,
0082 const G4VoxelLimits& pVoxelLimit,
0083 const G4AffineTransform& pTransform,
0084 G4double& pMin, G4double& pMax ) const override ;
0085
0086 EInside Inside( const G4ThreeVector& p ) const override ;
0087
0088 G4ThreeVector SurfaceNormal( const G4ThreeVector& p ) const override ;
0089
0090 G4double DistanceToIn( const G4ThreeVector& p,
0091 const G4ThreeVector& v ) const override ;
0092
0093 G4double DistanceToIn( const G4ThreeVector& p ) const override ;
0094
0095 G4double DistanceToOut( const G4ThreeVector& p,
0096 const G4ThreeVector& v,
0097 const G4bool calcNorm = false,
0098 G4bool* validNorm = nullptr,
0099 G4ThreeVector* n = nullptr ) const override ;
0100
0101 G4double DistanceToOut( const G4ThreeVector& p ) const override ;
0102
0103
0104 void ComputeDimensions( G4VPVParameterisation* p,
0105 const G4int n,
0106 const G4VPhysicalVolume* pRep ) override ;
0107
0108 void DescribeYourselfTo ( G4VGraphicsScene& scene ) const override ;
0109 G4Polyhedron* CreatePolyhedron () const override ;
0110
0111 G4double GetCubicVolume() final;
0112
0113 private:
0114
0115 void Init();
0116
0117 G4ThreeVector fPMin, fPMax;
0118 G4double halfCarTolerance;
0119 };
0120
0121 #endif