G4SubtractionSolid.hh

Go to the documentation of this file.
00001 //
00002 // ********************************************************************
00003 // * License and Disclaimer                                           *
00004 // *                                                                  *
00005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
00006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
00007 // * conditions of the Geant4 Software License,  included in the file *
00008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
00009 // * include a list of copyright holders.                             *
00010 // *                                                                  *
00011 // * Neither the authors of this software system, nor their employing *
00012 // * institutes,nor the agencies providing financial support for this *
00013 // * work  make  any representation or  warranty, express or implied, *
00014 // * regarding  this  software system or assume any liability for its *
00015 // * use.  Please see the license in the file  LICENSE  and URL above *
00016 // * for the full disclaimer and the limitation of liability.         *
00017 // *                                                                  *
00018 // * This  code  implementation is the result of  the  scientific and *
00019 // * technical work of the GEANT4 collaboration.                      *
00020 // * By using,  copying,  modifying or  distributing the software (or *
00021 // * any work based  on the software)  you  agree  to acknowledge its *
00022 // * use  in  resulting  scientific  publications,  and indicate your *
00023 // * acceptance of all terms of the Geant4 Software license.          *
00024 // ********************************************************************
00025 //
00026 //
00027 // $Id$
00028 //
00029 //
00030 // class G4SubtractionSolid
00031 //
00032 // Class description:
00033 //
00034 // Class for description of subtraction of two CSG solids: A - B.
00035 
00036 // History: 
00037 //
00038 // 14.10.98 V.Grichine: first implementation
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:  // with description
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:  // without description
00079 
00080     G4SubtractionSolid(__void__&);
00081       // Fake default constructor for usage restricted to direct object
00082       // persistency for clients requiring preallocation of memory for
00083       // persistifiable objects.
00084 
00085     G4SubtractionSolid(const G4SubtractionSolid& rhs);
00086     G4SubtractionSolid& operator=(const G4SubtractionSolid& rhs);
00087       // Copy constructor and assignment operator.
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

Generated on Mon May 27 17:49:56 2013 for Geant4 by  doxygen 1.4.7