Warning, file /include/Geant4/G4BooleanSolid.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 #ifndef G4BOOLEANSOLID_HH
0036 #define G4BOOLEANSOLID_HH
0037
0038 #include "G4DisplacedSolid.hh"
0039
0040 #include "G4ThreeVector.hh"
0041 #include "G4RotationMatrix.hh"
0042 #include "G4Transform3D.hh"
0043
0044 #include "G4VBooleanProcessor.hh"
0045
0046 class HepPolyhedronProcessor;
0047
0048
0049 class G4BooleanSolid : public G4VSolid
0050 {
0051 public:
0052
0053 G4BooleanSolid( const G4String& pName,
0054 G4VSolid* pSolidA ,
0055 G4VSolid* pSolidB );
0056
0057 G4BooleanSolid( const G4String& pName,
0058 G4VSolid* pSolidA ,
0059 G4VSolid* pSolidB,
0060 G4RotationMatrix* rotMatrix,
0061 const G4ThreeVector& transVector );
0062
0063 G4BooleanSolid( const G4String& pName,
0064 G4VSolid* pSolidA ,
0065 G4VSolid* pSolidB ,
0066 const G4Transform3D& transform );
0067
0068 ~G4BooleanSolid() override;
0069
0070 const G4VSolid* GetConstituentSolid(G4int no) const override;
0071 G4VSolid* GetConstituentSolid(G4int no) override;
0072
0073
0074
0075
0076 G4double GetCubicVolume() override;
0077 inline G4double GetSurfaceArea() override;
0078
0079 G4GeometryType GetEntityType() const override;
0080 G4Polyhedron* GetPolyhedron() const override;
0081
0082 std::ostream& StreamInfo(std::ostream& os) const override;
0083
0084 inline G4int GetCubVolStatistics() const;
0085 inline G4double GetCubVolEpsilon() const;
0086 void SetCubVolStatistics(G4int st);
0087 void SetCubVolEpsilon(G4double ep);
0088
0089 inline G4int GetAreaStatistics() const;
0090 inline G4double GetAreaAccuracy() const;
0091 inline void SetAreaStatistics(G4int st);
0092 inline void SetAreaAccuracy(G4double ep);
0093
0094 G4ThreeVector GetPointOnSurface() const override;
0095
0096 G4int GetNumOfConstituents() const override;
0097 G4bool IsFaceted() const override;
0098
0099 G4BooleanSolid(__void__&);
0100
0101
0102
0103
0104 G4BooleanSolid(const G4BooleanSolid& rhs);
0105 G4BooleanSolid& operator=(const G4BooleanSolid& rhs);
0106
0107
0108 static void SetExternalBooleanProcessor(G4VBooleanProcessor* extProcessor);
0109
0110 static G4VBooleanProcessor* GetExternalBooleanProcessor();
0111
0112
0113 protected:
0114
0115 void GetListOfPrimitives(std::vector<std::pair<G4VSolid *,G4Transform3D>>&,
0116 const G4Transform3D&) const;
0117
0118
0119 G4Polyhedron* StackPolyhedron(HepPolyhedronProcessor&,
0120 const G4VSolid*) const;
0121
0122
0123 protected:
0124
0125 G4VSolid* fPtrSolidA = nullptr;
0126 G4VSolid* fPtrSolidB = nullptr;
0127
0128 G4double fCubicVolume = -1.0;
0129
0130 G4double fSurfaceArea = -1.0;
0131
0132
0133 static G4VBooleanProcessor* fExternalBoolProcessor;
0134
0135
0136 private:
0137
0138 G4int fCubVolStatistics = 1000000;
0139 G4int fAreaStatistics = 1000000;
0140 G4double fCubVolEpsilon = 0.001;
0141 G4double fAreaAccuracy = -1;
0142
0143 mutable G4bool fRebuildPolyhedron = false;
0144 mutable G4Polyhedron* fpPolyhedron = nullptr;
0145
0146 mutable std::vector<std::pair<G4VSolid *,G4Transform3D>> fPrimitives;
0147 mutable G4double fPrimitivesSurfaceArea = 0.0;
0148
0149 G4bool createdDisplacedSolid = false;
0150
0151 };
0152
0153 #include "G4BooleanSolid.icc"
0154
0155 #endif