Geant4 11.2.2
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4ReflectedSolid.hh
Go to the documentation of this file.
1//
2// ********************************************************************
3// * License and Disclaimer *
4// * *
5// * The Geant4 software is copyright of the Copyright Holders of *
6// * the Geant4 Collaboration. It is provided under the terms and *
7// * conditions of the Geant4 Software License, included in the file *
8// * LICENSE and available at http://cern.ch/geant4/license . These *
9// * include a list of copyright holders. *
10// * *
11// * Neither the authors of this software system, nor their employing *
12// * institutes,nor the agencies providing financial support for this *
13// * work make any representation or warranty, express or implied, *
14// * regarding this software system or assume any liability for its *
15// * use. Please see the license in the file LICENSE and URL above *
16// * for the full disclaimer and the limitation of liability. *
17// * *
18// * This code implementation is the result of the scientific and *
19// * technical work of the GEANT4 collaboration. *
20// * By using, copying, modifying or distributing the software (or *
21// * any work based on the software) you agree to acknowledge its *
22// * use in resulting scientific publications, and indicate your *
23// * acceptance of all terms of the Geant4 Software license. *
24// ********************************************************************
25//
26// G4ReflectedSolid
27//
28// Class description:
29//
30// A Reflected solid is a solid that has been shifted from its original
31// frame of reference to a new one.
32
33// 23.07.01, V.Grichine - created
34// --------------------------------------------------------------------
35#ifndef G4ReflectedSolid_HH
36#define G4ReflectedSolid_HH
37
38#include "G4VSolid.hh"
39#include "G4ThreeVector.hh"
40#include "G4Transform3D.hh"
41
43{
44 public:
45
46 G4ReflectedSolid( const G4String& pName,
47 G4VSolid* pSolid ,
48 const G4Transform3D& transform ) ;
49 // For use in instantiating a transient instance.
50
51 ~G4ReflectedSolid() override;
52 // Virtual destructor.
53
54 // Includes all the methods that a solid requires.
55
56 EInside Inside( const G4ThreeVector& p ) const override;
57
58 void BoundingLimits(G4ThreeVector& pMin, G4ThreeVector& pMax) const override;
59
60 G4bool CalculateExtent( const EAxis pAxis,
61 const G4VoxelLimits& pVoxelLimit,
62 const G4AffineTransform& pTransform,
63 G4double& pMin, G4double& pMax) const override;
64
65 G4ThreeVector SurfaceNormal( const G4ThreeVector& p ) const override;
66
68 const G4ThreeVector& v ) const override;
69
70 G4double DistanceToIn( const G4ThreeVector& p) const override;
71
73 const G4ThreeVector& v,
74 const G4bool calcNorm = false,
75 G4bool* validNorm = nullptr,
76 G4ThreeVector* n = nullptr ) const override;
77
78 G4double DistanceToOut( const G4ThreeVector& p ) const override;
79
81 const G4int n,
82 const G4VPhysicalVolume* pRep ) override;
83
84 G4double GetCubicVolume() override;
85 G4double GetSurfaceArea() override;
86
87 G4ThreeVector GetPointOnSurface() const override;
88
89 G4VSolid* Clone() const override;
90
91 G4GeometryType GetEntityType() const override;
92
93 virtual const G4ReflectedSolid* GetReflectedSolidPtr() const;
95 // If the Solid is a "G4ReflectedSolid",
96 // return a self pointer else return nullptr.
97
99
103 // Accessors methods.
104
105 std::ostream& StreamInfo(std::ostream& os) const override;
106
109 // Copy constructor and assignment operator.
110
111 void DescribeYourselfTo ( G4VGraphicsScene& scene ) const override;
112 G4Polyhedron* CreatePolyhedron () const override;
113 G4Polyhedron* GetPolyhedron () const override;
114 // For creating graphical representations (i.e. for visualisation).
115
116 protected:
117
118 G4VSolid* fPtrSolid = nullptr;
120
121 mutable G4bool fRebuildPolyhedron = false;
122 mutable G4Polyhedron* fpPolyhedron = nullptr;
123 // Caches reflected G4Polyhedron.
124};
125
126#endif
double G4double
Definition G4Types.hh:83
bool G4bool
Definition G4Types.hh:86
int G4int
Definition G4Types.hh:85
G4VSolid * Clone() const override
G4GeometryType GetEntityType() const override
G4ThreeVector SurfaceNormal(const G4ThreeVector &p) const override
G4Transform3D GetDirectTransform3D() const
G4Polyhedron * fpPolyhedron
G4double DistanceToOut(const G4ThreeVector &p, const G4ThreeVector &v, const G4bool calcNorm=false, G4bool *validNorm=nullptr, G4ThreeVector *n=nullptr) const override
G4bool CalculateExtent(const EAxis pAxis, const G4VoxelLimits &pVoxelLimit, const G4AffineTransform &pTransform, G4double &pMin, G4double &pMax) const override
G4double DistanceToIn(const G4ThreeVector &p, const G4ThreeVector &v) const override
std::ostream & StreamInfo(std::ostream &os) const override
EInside Inside(const G4ThreeVector &p) const override
void BoundingLimits(G4ThreeVector &pMin, G4ThreeVector &pMax) const override
G4Polyhedron * CreatePolyhedron() const override
G4Polyhedron * GetPolyhedron() const override
void SetDirectTransform3D(G4Transform3D &)
void DescribeYourselfTo(G4VGraphicsScene &scene) const override
G4Transform3D GetTransform3D() const
void ComputeDimensions(G4VPVParameterisation *p, const G4int n, const G4VPhysicalVolume *pRep) override
G4VSolid * GetConstituentMovedSolid() const
~G4ReflectedSolid() override
G4double GetCubicVolume() override
G4ReflectedSolid(const G4String &pName, G4VSolid *pSolid, const G4Transform3D &transform)
virtual const G4ReflectedSolid * GetReflectedSolidPtr() const
G4ReflectedSolid & operator=(const G4ReflectedSolid &rhs)
G4ThreeVector GetPointOnSurface() const override
G4Transform3D * fDirectTransform3D
G4double GetSurfaceArea() override
EAxis
Definition geomdefs.hh:54
EInside
Definition geomdefs.hh:67