G4UnionSolid.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 G4UnionSolid
00031 //
00032 // Class description:
00033 //
00034 // Class for description of union of two CSG solids.
00035 
00036 // History: 
00037 //
00038 // 12.09.98 V.Grichine: created
00039 //
00040 // --------------------------------------------------------------------
00041 #ifndef G4UNIONSOLID_HH
00042 #define G4UNIONSOLID_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 class G4UnionSolid : public G4BooleanSolid
00053 {
00054   public:  // with description
00055 
00056     G4UnionSolid( const G4String& pName,
00057                         G4VSolid* pSolidA ,
00058                         G4VSolid* pSolidB   ) ;
00059 
00060     G4UnionSolid( const G4String& pName,
00061                         G4VSolid* pSolidA ,
00062                         G4VSolid* pSolidB ,
00063                         G4RotationMatrix* rotMatrix,
00064                   const G4ThreeVector& transVector    ) ;
00065 
00066     G4UnionSolid( const G4String& pName,
00067                         G4VSolid* pSolidA ,
00068                         G4VSolid* pSolidB ,
00069                   const G4Transform3D& transform   ) ;
00070 
00071     virtual ~G4UnionSolid() ;
00072 
00073     G4GeometryType  GetEntityType() const ;
00074 
00075     G4VSolid* Clone() const;
00076 
00077   public:  // without description
00078 
00079     G4UnionSolid(__void__&);
00080       // Fake default constructor for usage restricted to direct object
00081       // persistency for clients requiring preallocation of memory for
00082       // persistifiable objects.
00083 
00084     G4UnionSolid(const G4UnionSolid& rhs);
00085     G4UnionSolid& operator=(const G4UnionSolid& rhs);
00086       // Copy constructor and assignment operator.
00087 
00088     G4bool CalculateExtent( const EAxis pAxis,
00089                             const G4VoxelLimits& pVoxelLimit,
00090                             const G4AffineTransform& pTransform,
00091                                   G4double& pMin, G4double& pMax ) const ;
00092        
00093     EInside Inside( const G4ThreeVector& p ) const ;
00094 
00095     G4ThreeVector SurfaceNormal( const G4ThreeVector& p ) const ;
00096 
00097     G4double DistanceToIn( const G4ThreeVector& p,
00098                            const G4ThreeVector& v  ) const ;
00099 
00100     G4double DistanceToIn( const G4ThreeVector& p ) const ;
00101 
00102     G4double DistanceToOut( const G4ThreeVector& p,
00103                             const G4ThreeVector& v,
00104                             const G4bool calcNorm=false,
00105                                   G4bool *validNorm=0,
00106                                   G4ThreeVector *n=0 ) const ;
00107 
00108     G4double DistanceToOut( const G4ThreeVector& p ) const ;
00109 
00110 
00111     void ComputeDimensions(       G4VPVParameterisation* p,
00112                             const G4int n,
00113                             const G4VPhysicalVolume* pRep ) ;
00114                                    
00115     void DescribeYourselfTo ( G4VGraphicsScene& scene ) const ;
00116     G4Polyhedron* CreatePolyhedron () const ;
00117     G4NURBS*      CreateNURBS      () const ;
00118 
00119 };
00120 
00121 #endif

Generated on Mon May 27 17:50:07 2013 for Geant4 by  doxygen 1.4.7