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
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057 #ifndef G4Paraboloid_HH
00058 #define G4Paraboloid_HH
00059
00060 #include <CLHEP/Units/PhysicalConstants.h>
00061
00062 #include "G4VSolid.hh"
00063
00064 class G4Paraboloid : public G4VSolid
00065 {
00066 public:
00067
00068 G4Paraboloid(const G4String& pName,
00069 G4double pDz,
00070 G4double pR1,
00071 G4double pR2);
00072
00073 virtual ~G4Paraboloid();
00074
00075
00076
00077 inline G4double GetZHalfLength() const;
00078 inline G4double GetRadiusMinusZ() const;
00079 inline G4double GetRadiusPlusZ() const;
00080
00081 inline G4double GetCubicVolume();
00082 inline G4double GetSurfaceArea();
00083 inline G4double CalculateSurfaceArea() const;
00084
00085
00086
00087 inline void SetZHalfLength(G4double dz);
00088 inline void SetRadiusMinusZ(G4double R1);
00089 inline void SetRadiusPlusZ(G4double R2);
00090
00091
00092
00093
00094
00095
00096 G4bool CalculateExtent(const EAxis pAxis,
00097 const G4VoxelLimits& pVoxelLimit,
00098 const G4AffineTransform& pTransform,
00099 G4double& pmin, G4double& pmax) const;
00100 EInside Inside(const G4ThreeVector& p) const;
00101 G4ThreeVector SurfaceNormal( const G4ThreeVector& p) const;
00102 G4double DistanceToIn(const G4ThreeVector& p,
00103 const G4ThreeVector& v) const;
00104 G4double DistanceToIn(const G4ThreeVector& p) const;
00105 G4double DistanceToOut(const G4ThreeVector& p,
00106 const G4ThreeVector& v,
00107 const G4bool calcNorm=G4bool(false),
00108 G4bool *validNorm=0,
00109 G4ThreeVector *n=0) const;
00110 G4double DistanceToOut(const G4ThreeVector& p) const;
00111
00112 G4GeometryType GetEntityType() const;
00113
00114 G4VSolid* Clone() const;
00115
00116 std::ostream& StreamInfo(std::ostream& os) const;
00117
00118 G4ThreeVector GetPointOnSurface() const;
00119
00120
00121
00122 void DescribeYourselfTo(G4VGraphicsScene& scene) const;
00123 G4Polyhedron* CreatePolyhedron() const;
00124 G4Polyhedron* GetPolyhedron () const;
00125 G4NURBS* CreateNURBS() const;
00126
00127 public:
00128
00129 G4Paraboloid(__void__&);
00130
00131
00132
00133
00134 G4Paraboloid(const G4Paraboloid& rhs);
00135 G4Paraboloid& operator=(const G4Paraboloid& rhs);
00136
00137
00138 protected:
00139
00140 mutable G4Polyhedron* fpPolyhedron;
00141
00142 private:
00143
00144 G4ThreeVectorList*
00145 CreateRotatedVertices(const G4AffineTransform& pTransform,
00146 G4int& noPolygonVertices) const;
00147
00148
00149 mutable G4double fSurfaceArea;
00150 G4double fCubicVolume;
00151
00152 G4double dz, r1, r2;
00153 G4double k1, k2;
00154
00155 };
00156
00157 #include "G4Paraboloid.icc"
00158
00159 #endif