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
00043
00044 #ifndef G4Orb_HH
00045 #define G4Orb_HH
00046
00047 #include <CLHEP/Units/PhysicalConstants.h>
00048
00049 #include "G4CSGSolid.hh"
00050
00051 class G4Orb : public G4CSGSolid
00052 {
00053 public:
00054
00055 G4Orb(const G4String& pName, G4double pRmax);
00056
00057 virtual ~G4Orb() ;
00058
00059
00060
00061 inline G4double GetRadius() const;
00062
00063
00064
00065 inline void SetRadius(G4double newRmax);
00066
00067
00068
00069 inline G4double GetCubicVolume();
00070 inline G4double GetSurfaceArea();
00071
00072 void ComputeDimensions( G4VPVParameterisation* p,
00073 const G4int n,
00074 const G4VPhysicalVolume* pRep);
00075
00076 G4bool CalculateExtent(const EAxis pAxis,
00077 const G4VoxelLimits& pVoxelLimit,
00078 const G4AffineTransform& pTransform,
00079 G4double& pmin, G4double& pmax) const;
00080
00081 EInside Inside(const G4ThreeVector& p) const;
00082
00083 G4ThreeVector SurfaceNormal( const G4ThreeVector& p) const;
00084
00085 G4double DistanceToIn(const G4ThreeVector& p,
00086 const G4ThreeVector& v) const;
00087
00088 G4double DistanceToIn(const G4ThreeVector& p) const;
00089
00090 G4double DistanceToOut(const G4ThreeVector& p,
00091 const G4ThreeVector& v,
00092 const G4bool calcNorm=G4bool(false),
00093 G4bool *validNorm=0,
00094 G4ThreeVector *n=0) const;
00095
00096 G4double DistanceToOut(const G4ThreeVector& p) const;
00097
00098 G4GeometryType GetEntityType() const;
00099
00100 G4ThreeVector GetPointOnSurface() const;
00101
00102 G4VSolid* Clone() const;
00103
00104 std::ostream& StreamInfo(std::ostream& os) const;
00105
00106
00107
00108 void DescribeYourselfTo(G4VGraphicsScene& scene) const;
00109 G4Polyhedron* CreatePolyhedron() const;
00110 G4NURBS* CreateNURBS() const;
00111
00112 public:
00113
00114 G4Orb(__void__&);
00115
00116
00117
00118
00119 G4Orb(const G4Orb& rhs);
00120 G4Orb& operator=(const G4Orb& rhs);
00121
00122
00123 protected:
00124
00125
00126
00127 enum ESide {kNull,kRMax};
00128
00129
00130
00131 enum ENorm {kNRMax};
00132
00133 private:
00134
00135 G4double fRmax;
00136 G4double fRmaxTolerance;
00137 };
00138
00139 #include "G4Orb.icc"
00140
00141 #endif