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 #ifndef G4SUBTRACTIONSOLID_HH
00042 #define G4SUBTRACTIONSOLID_HH
00043 
00044 #include "G4BooleanSolid.hh"
00045 #include "G4VSolid.hh"
00046 
00047 #include "G4RotationMatrix.hh"
00048 #include "G4ThreeVector.hh"
00049 #include "G4Transform3D.hh"
00050 #include "G4AffineTransform.hh"
00051 
00052 
00053 class G4SubtractionSolid : public G4BooleanSolid
00054 {
00055   public:  
00056 
00057     G4SubtractionSolid(  const G4String& pName,
00058                                G4VSolid* pSolidA ,
00059                                G4VSolid* pSolidB   ) ;
00060 
00061     G4SubtractionSolid(  const G4String& pName,
00062                                G4VSolid* pSolidA ,
00063                                G4VSolid* pSolidB ,
00064                                G4RotationMatrix* rotMatrix,
00065                          const G4ThreeVector& transVector   ) ;
00066 
00067     G4SubtractionSolid(  const G4String& pName,
00068                                G4VSolid* pSolidA ,
00069                                G4VSolid* pSolidB ,
00070                          const G4Transform3D& transform   ) ;
00071 
00072     virtual ~G4SubtractionSolid() ;
00073 
00074     G4GeometryType  GetEntityType() const ;
00075 
00076     G4VSolid* Clone() const;
00077 
00078   public:  
00079 
00080     G4SubtractionSolid(__void__&);
00081       
00082       
00083       
00084 
00085     G4SubtractionSolid(const G4SubtractionSolid& rhs);
00086     G4SubtractionSolid& operator=(const G4SubtractionSolid& rhs);
00087       
00088 
00089     G4bool CalculateExtent( const EAxis pAxis,
00090                             const G4VoxelLimits& pVoxelLimit,
00091                             const G4AffineTransform& pTransform,
00092                                   G4double& pMin, G4double& pMax) const ;
00093        
00094     EInside Inside( const G4ThreeVector& p ) const ;
00095 
00096     G4ThreeVector SurfaceNormal( const G4ThreeVector& p ) const ;
00097 
00098     G4double DistanceToIn( const G4ThreeVector& p,
00099                            const G4ThreeVector& v  ) const ;
00100 
00101     G4double DistanceToIn( const G4ThreeVector& p) const ;
00102 
00103     G4double DistanceToOut( const G4ThreeVector& p,
00104                             const G4ThreeVector& v,
00105                             const G4bool calcNorm=false,
00106                                   G4bool *validNorm=0,
00107                                   G4ThreeVector *n=0   ) const ;
00108 
00109     G4double DistanceToOut( const G4ThreeVector& p ) const ;
00110 
00111 
00112     void ComputeDimensions(       G4VPVParameterisation* p,
00113                             const G4int n,
00114                             const G4VPhysicalVolume* pRep ) ;
00115                                    
00116     void DescribeYourselfTo ( G4VGraphicsScene& scene ) const ;
00117     G4Polyhedron* CreatePolyhedron () const ;
00118     G4NURBS*      CreateNURBS      () const ;
00119 
00120 };
00121 
00122 #endif