File indexing completed on 2025-01-18 09:59:02
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
0035 #ifndef G4ReflectedSolid_HH
0036 #define G4ReflectedSolid_HH
0037
0038 #include "G4VSolid.hh"
0039 #include "G4ThreeVector.hh"
0040 #include "G4Transform3D.hh"
0041
0042 class G4ReflectedSolid : public G4VSolid
0043 {
0044 public:
0045
0046 G4ReflectedSolid( const G4String& pName,
0047 G4VSolid* pSolid ,
0048 const G4Transform3D& transform ) ;
0049
0050
0051 ~G4ReflectedSolid() override;
0052
0053
0054
0055
0056 EInside Inside( const G4ThreeVector& p ) const override;
0057
0058 void BoundingLimits(G4ThreeVector& pMin, G4ThreeVector& pMax) const override;
0059
0060 G4bool CalculateExtent( const EAxis pAxis,
0061 const G4VoxelLimits& pVoxelLimit,
0062 const G4AffineTransform& pTransform,
0063 G4double& pMin, G4double& pMax) const override;
0064
0065 G4ThreeVector SurfaceNormal( const G4ThreeVector& p ) const override;
0066
0067 G4double DistanceToIn( const G4ThreeVector& p,
0068 const G4ThreeVector& v ) const override;
0069
0070 G4double DistanceToIn( const G4ThreeVector& p) const override;
0071
0072 G4double DistanceToOut( const G4ThreeVector& p,
0073 const G4ThreeVector& v,
0074 const G4bool calcNorm = false,
0075 G4bool* validNorm = nullptr,
0076 G4ThreeVector* n = nullptr ) const override;
0077
0078 G4double DistanceToOut( const G4ThreeVector& p ) const override;
0079
0080 void ComputeDimensions( G4VPVParameterisation* p,
0081 const G4int n,
0082 const G4VPhysicalVolume* pRep ) override;
0083
0084 G4double GetCubicVolume() override;
0085 G4double GetSurfaceArea() override;
0086
0087 G4ThreeVector GetPointOnSurface() const override;
0088
0089 G4VSolid* Clone() const override;
0090
0091 G4GeometryType GetEntityType() const override;
0092
0093 virtual const G4ReflectedSolid* GetReflectedSolidPtr() const;
0094 virtual G4ReflectedSolid* GetReflectedSolidPtr();
0095
0096
0097
0098 G4VSolid* GetConstituentMovedSolid() const;
0099
0100 G4Transform3D GetTransform3D() const;
0101 G4Transform3D GetDirectTransform3D() const;
0102 void SetDirectTransform3D(G4Transform3D&);
0103
0104
0105 std::ostream& StreamInfo(std::ostream& os) const override;
0106
0107 G4ReflectedSolid(const G4ReflectedSolid& rhs);
0108 G4ReflectedSolid& operator=(const G4ReflectedSolid& rhs);
0109
0110
0111 void DescribeYourselfTo ( G4VGraphicsScene& scene ) const override;
0112 G4Polyhedron* CreatePolyhedron () const override;
0113 G4Polyhedron* GetPolyhedron () const override;
0114
0115
0116 protected:
0117
0118 G4VSolid* fPtrSolid = nullptr;
0119 G4Transform3D* fDirectTransform3D = nullptr;
0120
0121 mutable G4bool fRebuildPolyhedron = false;
0122 mutable G4Polyhedron* fpPolyhedron = nullptr;
0123
0124 };
0125
0126 #endif