00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042 #ifndef G4BOOLEANSOLID_HH
00043 #define G4BOOLEANSOLID_HH
00044
00045 #include "G4DisplacedSolid.hh"
00046
00047 #include "G4ThreeVector.hh"
00048 #include "G4RotationMatrix.hh"
00049 #include "G4Transform3D.hh"
00050
00051 class HepPolyhedronProcessor;
00052
00053 class G4BooleanSolid : public G4VSolid
00054 {
00055 public:
00056
00057 G4BooleanSolid( const G4String& pName,
00058 G4VSolid* pSolidA ,
00059 G4VSolid* pSolidB );
00060
00061 G4BooleanSolid( const G4String& pName,
00062 G4VSolid* pSolidA ,
00063 G4VSolid* pSolidB,
00064 G4RotationMatrix* rotMatrix,
00065 const G4ThreeVector& transVector );
00066
00067 G4BooleanSolid( const G4String& pName,
00068 G4VSolid* pSolidA ,
00069 G4VSolid* pSolidB ,
00070 const G4Transform3D& transform );
00071
00072 virtual ~G4BooleanSolid();
00073
00074 virtual const G4VSolid* GetConstituentSolid(G4int no) const;
00075 virtual G4VSolid* GetConstituentSolid(G4int no);
00076
00077
00078
00079
00080 inline G4double GetCubicVolume();
00081 inline G4double GetSurfaceArea();
00082
00083 virtual G4GeometryType GetEntityType() const;
00084 virtual G4Polyhedron* GetPolyhedron () const;
00085
00086 std::ostream& StreamInfo(std::ostream& os) const;
00087
00088 inline G4int GetCubVolStatistics() const;
00089 inline G4double GetCubVolEpsilon() const;
00090 inline void SetCubVolStatistics(G4int st);
00091 inline void SetCubVolEpsilon(G4double ep);
00092
00093 inline G4int GetAreaStatistics() const;
00094 inline G4double GetAreaAccuracy() const;
00095 inline void SetAreaStatistics(G4int st);
00096 inline void SetAreaAccuracy(G4double ep);
00097
00098 G4ThreeVector GetPointOnSurface() const;
00099
00100 public:
00101
00102 G4BooleanSolid(__void__&);
00103
00104
00105
00106
00107 G4BooleanSolid(const G4BooleanSolid& rhs);
00108 G4BooleanSolid& operator=(const G4BooleanSolid& rhs);
00109
00110
00111 protected:
00112
00113 G4Polyhedron* StackPolyhedron(HepPolyhedronProcessor&,
00114 const G4VSolid*) const;
00115
00116
00117 inline G4double GetAreaRatio() const;
00118
00119
00120 protected:
00121
00122 G4VSolid* fPtrSolidA;
00123 G4VSolid* fPtrSolidB;
00124
00125 mutable G4double fAreaRatio;
00126
00127 private:
00128
00129 G4int fStatistics;
00130 G4double fCubVolEpsilon;
00131 G4double fAreaAccuracy;
00132 G4double fCubicVolume;
00133 G4double fSurfaceArea;
00134
00135 mutable G4Polyhedron* fpPolyhedron;
00136
00137 G4bool createdDisplacedSolid;
00138
00139
00140 } ;
00141
00142 #include "G4BooleanSolid.icc"
00143
00144 #endif