File indexing completed on 2025-10-29 08:44:24
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     G4int GetNumOfConstituents() const override;
0090 
0091     G4bool IsFaceted() const override;
0092 
0093     G4VSolid* Clone() const override;
0094 
0095     G4GeometryType  GetEntityType() const override;
0096 
0097     virtual const G4ReflectedSolid* GetReflectedSolidPtr() const;
0098     virtual       G4ReflectedSolid* GetReflectedSolidPtr();
0099       
0100       
0101 
0102     G4VSolid* GetConstituentMovedSolid() const;
0103 
0104     G4Transform3D GetTransform3D() const; 
0105     G4Transform3D GetDirectTransform3D() const; 
0106     void SetDirectTransform3D(G4Transform3D&);
0107       
0108 
0109     std::ostream& StreamInfo(std::ostream& os) const override;
0110 
0111     G4ReflectedSolid(const G4ReflectedSolid& rhs);
0112     G4ReflectedSolid& operator=(const G4ReflectedSolid& rhs);
0113       
0114 
0115     void DescribeYourselfTo ( G4VGraphicsScene& scene ) const override;
0116     G4Polyhedron* CreatePolyhedron () const override;
0117     G4Polyhedron* GetPolyhedron    () const override;
0118       
0119 
0120   protected:
0121 
0122     G4VSolid*          fPtrSolid = nullptr;
0123     G4Transform3D*     fDirectTransform3D = nullptr;
0124 
0125     mutable G4bool fRebuildPolyhedron = false;
0126     mutable G4Polyhedron* fpPolyhedron = nullptr;
0127       
0128 };
0129 
0130 #endif