File indexing completed on 2025-01-18 09:16:36
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
0039
0040
0041
0042
0043
0044
0045
0046
0047
0048 #ifndef FastAerosolSolid_HH
0049 #define FastAerosolSolid_HH
0050
0051 #include "FastAerosol.hh"
0052
0053 #include "G4Polyhedron.hh"
0054
0055
0056 #include <functional>
0057 #include "G4RotationMatrix.hh"
0058
0059 class FastAerosolSolid : public G4VSolid
0060 {
0061 public:
0062 FastAerosolSolid(const G4String& pName, FastAerosol* pCloud,
0063 G4VSolid* pDroplet,
0064 std::function<G4RotationMatrix (G4ThreeVector)> pRotation);
0065
0066 FastAerosolSolid(const G4String& pName, FastAerosol* pCloud,
0067 G4VSolid* pDroplet);
0068 ~FastAerosolSolid()=default;
0069
0070
0071 inline G4double GetCubicVolume();
0072 inline G4double GetSurfaceArea();
0073
0074
0075 G4bool CalculateExtent(const EAxis pAxis,
0076 const G4VoxelLimits& pVoxelLimit,
0077 const G4AffineTransform& pTransform,
0078 G4double& pmin, G4double& pmax) const;
0079
0080 EInside Inside(const G4ThreeVector& p) const;
0081
0082 G4ThreeVector SurfaceNormal(const G4ThreeVector& p) const;
0083
0084 G4double DistanceToIn(const G4ThreeVector& p,
0085 const G4ThreeVector& v) const;
0086
0087 G4double DistanceToIn(const G4ThreeVector& p) const;
0088 G4double DistanceToOut(const G4ThreeVector& p,
0089 const G4ThreeVector& v,
0090 const G4bool calcNorm=G4bool(false),
0091 G4bool *validNorm=0, G4ThreeVector *n=0) const;
0092
0093 G4double DistanceToOut(const G4ThreeVector& p) const;
0094
0095 G4GeometryType GetEntityType() const;
0096
0097 G4VSolid* Clone() const;
0098
0099 std::ostream& StreamInfo(std::ostream& os) const;
0100
0101 G4ThreeVector GetPointOnSurface() const;
0102
0103 G4Polyhedron* GetPolyhedron () const;
0104 void DescribeYourselfTo(G4VGraphicsScene& scene) const;
0105 G4VisExtent GetExtent() const;
0106 G4Polyhedron* CreatePolyhedron() const;
0107
0108 public:
0109 FastAerosolSolid(__void__&);
0110
0111
0112
0113
0114
0115 FastAerosolSolid(const FastAerosolSolid& rhs);
0116 FastAerosolSolid& operator=(const FastAerosolSolid& rhs);
0117
0118
0119 inline void SetStepLim(G4double newLim);
0120
0121 private:
0122
0123 inline void Initialize();
0124
0125
0126
0127 G4double fStepLim = DBL_MAX;
0128
0129 FastAerosol* fCloud;
0130 G4VSolid* fDroplet;
0131 G4VSolid* fBulk;
0132
0133 G4double fR = 0.0;
0134
0135 G4double fVisDx, fVisDy, fVisDz;
0136
0137 G4double fCubicVolume = 0.0;
0138 G4double fSurfaceArea = 0.0;
0139
0140 G4double farFromCloudDist;
0141
0142 std::function<G4RotationMatrix (G4ThreeVector)> fRotation;
0143
0144
0145 protected:
0146
0147 mutable G4bool fRebuildPolyhedron;
0148 mutable G4Polyhedron* fpPolyhedron;
0149 };
0150
0151 #include "FastAerosolSolid.icc"
0152
0153 #endif