Warning, file /include/Geant4/G4Box.hh 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
0034
0035
0036
0037
0038 #ifndef G4BOX_HH
0039 #define G4BOX_HH
0040
0041 #include "G4GeomTypes.hh"
0042
0043 #if defined(G4GEOM_USE_USOLIDS)
0044 #define G4GEOM_USE_UBOX 1
0045 #endif
0046
0047 #if defined(G4GEOM_USE_UBOX)
0048 #define G4UBox G4Box
0049 #include "G4UBox.hh"
0050 #else
0051
0052 #include "G4CSGSolid.hh"
0053 #include "G4Polyhedron.hh"
0054
0055 class G4Box : public G4CSGSolid
0056 {
0057 public:
0058
0059 G4Box(const G4String& pName, G4double pX, G4double pY, G4double pZ);
0060
0061
0062 ~G4Box() override;
0063
0064 void ComputeDimensions(G4VPVParameterisation* p,
0065 const G4int n,
0066 const G4VPhysicalVolume* pRep) override;
0067
0068 void BoundingLimits(G4ThreeVector& pMin, G4ThreeVector& pMax) const override;
0069
0070 G4bool CalculateExtent(const EAxis pAxis,
0071 const G4VoxelLimits& pVoxelLimit,
0072 const G4AffineTransform& pTransform,
0073 G4double& pMin, G4double& pMax) const override;
0074
0075
0076
0077 inline G4double GetXHalfLength() const;
0078 inline G4double GetYHalfLength() const;
0079 inline G4double GetZHalfLength() const;
0080
0081 void SetXHalfLength(G4double dx) ;
0082 void SetYHalfLength(G4double dy) ;
0083 void SetZHalfLength(G4double dz) ;
0084
0085
0086
0087 inline G4double GetCubicVolume() override;
0088 inline G4double GetSurfaceArea() override;
0089
0090 EInside Inside(const G4ThreeVector& p) const override;
0091 G4ThreeVector SurfaceNormal( const G4ThreeVector& p) const override;
0092 G4double DistanceToIn(const G4ThreeVector& p,
0093 const G4ThreeVector& v) const override;
0094 G4double DistanceToIn(const G4ThreeVector& p) const override;
0095 G4double DistanceToOut(const G4ThreeVector& p, const G4ThreeVector& v,
0096 const G4bool calcNorm = false,
0097 G4bool* validNorm = nullptr,
0098 G4ThreeVector* n = nullptr) const override;
0099 G4double DistanceToOut(const G4ThreeVector& p) const override;
0100
0101 G4GeometryType GetEntityType() const override;
0102 G4ThreeVector GetPointOnSurface() const override;
0103
0104 G4bool IsFaceted() const override;
0105
0106 G4VSolid* Clone() const override;
0107
0108 std::ostream& StreamInfo(std::ostream& os) const override;
0109
0110
0111
0112 void DescribeYourselfTo (G4VGraphicsScene& scene) const override;
0113 G4VisExtent GetExtent () const override;
0114 G4Polyhedron* CreatePolyhedron () const override;
0115
0116 G4Box(__void__&);
0117
0118
0119
0120
0121 G4Box(const G4Box& rhs);
0122 G4Box& operator=(const G4Box& rhs);
0123
0124
0125 private:
0126
0127 G4ThreeVector ApproxSurfaceNormal( const G4ThreeVector& p) const;
0128
0129
0130
0131 private:
0132
0133 G4double fDx = 0.0, fDy = 0.0, fDz = 0.0;
0134 G4double delta;
0135 };
0136
0137 #include "G4Box.icc"
0138
0139 #endif
0140
0141 #endif