Import Geant4 2.0.0 source tree
This commit is contained in:
@@ -1,11 +1,24 @@
|
||||
// Class Description
|
||||
// This code implementation is the intellectual property of
|
||||
// the GEANT4 collaboration.
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4BooleanSolid.hh,v 1.3 2000/04/27 09:59:36 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
//
|
||||
//
|
||||
// class G4BooleanSolid
|
||||
//
|
||||
// Class description:
|
||||
//
|
||||
// Abstract base class for solids created by boolean operations
|
||||
// between other solids
|
||||
// between other solids.
|
||||
|
||||
// History:
|
||||
//
|
||||
// 10.09.98 V.Grichine, creation according J. Apostolakis's recommendations
|
||||
// 10.09.98 V.Grichine, creation according J. Apostolakis's recommendations.
|
||||
|
||||
|
||||
#ifndef G4BOOLEANSOLID_HH
|
||||
@@ -19,41 +32,42 @@
|
||||
#include "G4Transform3D.hh"
|
||||
#include "G4AffineTransform.hh"
|
||||
|
||||
|
||||
class G4BooleanSolid: public G4VSolid
|
||||
class G4BooleanSolid : public G4VSolid
|
||||
{
|
||||
public: // With Description
|
||||
G4BooleanSolid( const G4String& pName,
|
||||
G4VSolid* pSolidA ,
|
||||
G4VSolid* pSolidB ) ;
|
||||
public: // with description
|
||||
|
||||
G4BooleanSolid( const G4String& pName,
|
||||
G4VSolid* pSolidA ,
|
||||
G4VSolid* pSolidB ) ;
|
||||
|
||||
G4BooleanSolid( const G4String& pName,
|
||||
G4VSolid* pSolidA ,
|
||||
G4VSolid* pSolidB,
|
||||
G4RotationMatrix* rotMatrix,
|
||||
const G4ThreeVector& transVector ) ;
|
||||
G4BooleanSolid( const G4String& pName,
|
||||
G4VSolid* pSolidA ,
|
||||
G4VSolid* pSolidB,
|
||||
G4RotationMatrix* rotMatrix,
|
||||
const G4ThreeVector& transVector ) ;
|
||||
|
||||
G4BooleanSolid( const G4String& pName,
|
||||
G4VSolid* pSolidA ,
|
||||
G4VSolid* pSolidB ,
|
||||
const G4Transform3D& transform ) ;
|
||||
G4BooleanSolid( const G4String& pName,
|
||||
G4VSolid* pSolidA ,
|
||||
G4VSolid* pSolidB ,
|
||||
const G4Transform3D& transform ) ;
|
||||
|
||||
virtual ~G4BooleanSolid() ;
|
||||
virtual ~G4BooleanSolid() ;
|
||||
|
||||
public: // With Description
|
||||
// If Solid is made up from a Boolean operation of two solids,
|
||||
// return the corresponding solid (for no=0 and 1)
|
||||
// If the solid is not a "Boolean", return 0
|
||||
virtual const G4VSolid* GetConstituentSolid(G4int no) const;
|
||||
virtual G4VSolid* GetConstituentSolid(G4int no);
|
||||
// If Solid is made up from a Boolean operation of two solids,
|
||||
// return the corresponding solid (for no=0 and 1)
|
||||
// If the solid is not a "Boolean", return 0.
|
||||
|
||||
protected:
|
||||
G4VSolid* fPtrSolidA ;
|
||||
G4VSolid* fPtrSolidB ;
|
||||
protected:
|
||||
|
||||
G4VSolid* fPtrSolidA ;
|
||||
G4VSolid* fPtrSolidB ;
|
||||
|
||||
private:
|
||||
G4bool createdDisplacedSolid; // If & only if this object
|
||||
// created it, it must delete it
|
||||
private:
|
||||
|
||||
G4bool createdDisplacedSolid;
|
||||
// If & only if this object created it, it must delete it
|
||||
} ;
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,9 +1,22 @@
|
||||
// Class description
|
||||
// This code implementation is the intellectual property of
|
||||
// the GEANT4 collaboration.
|
||||
//
|
||||
// A displaced solid is a solid that has been shifted from its original
|
||||
// frame of reference to a new one. It is meant to be used only for
|
||||
// simplifying the implementation of "Boolean solids".
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4DisplacedSolid.hh,v 1.7 2000/04/27 09:59:36 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
//
|
||||
//
|
||||
// class G4DisplacedSolid
|
||||
//
|
||||
// Class description:
|
||||
//
|
||||
// A displaced solid is a solid that has been shifted from its original
|
||||
// frame of reference to a new one. It is meant to be used only for
|
||||
// simplifying the implementation of "Boolean solids".
|
||||
|
||||
// History:
|
||||
//
|
||||
// 28.10.98 V.Grichine, creation according J. Apostolakis's recommendations
|
||||
@@ -17,36 +30,36 @@
|
||||
#include "G4Transform3D.hh"
|
||||
#include "G4AffineTransform.hh"
|
||||
|
||||
class G4DisplacedSolid : public G4VSolid
|
||||
class G4DisplacedSolid : public G4VSolid
|
||||
{
|
||||
public: // With description
|
||||
G4DisplacedSolid( const G4String& pName,
|
||||
G4VSolid* pSolid ,
|
||||
G4RotationMatrix* rotMatrix,
|
||||
const G4ThreeVector& transVector ) ;
|
||||
public: // with description
|
||||
|
||||
G4DisplacedSolid( const G4String& pName,
|
||||
G4VSolid* pSolid ,
|
||||
const G4Transform3D& transform ) ;
|
||||
G4DisplacedSolid( const G4String& pName,
|
||||
G4VSolid* pSolid ,
|
||||
G4RotationMatrix* rotMatrix,
|
||||
const G4ThreeVector& transVector ) ;
|
||||
|
||||
public:
|
||||
G4DisplacedSolid( const G4String& pName,
|
||||
G4VSolid* pSolid ,
|
||||
const G4AffineTransform directTransform );
|
||||
// For use in instantiating a transient instance from a persistent one:
|
||||
G4DisplacedSolid( const G4String& pName,
|
||||
G4VSolid* pSolid ,
|
||||
const G4Transform3D& transform ) ;
|
||||
|
||||
public: // With description
|
||||
virtual ~G4DisplacedSolid() ;
|
||||
//
|
||||
// It also has all the methods that a solid requires, eg.
|
||||
EInside Inside( const G4ThreeVector& p ) const ;
|
||||
G4DisplacedSolid( const G4String& pName,
|
||||
G4VSolid* pSolid ,
|
||||
const G4AffineTransform directTransform );
|
||||
// For use in instantiating a transient instance from a persistent one.
|
||||
|
||||
public:
|
||||
G4bool CalculateExtent(const EAxis pAxis,
|
||||
const G4VoxelLimits& pVoxelLimit,
|
||||
const G4AffineTransform& pTransform,
|
||||
G4double& pMin, G4double& pMax) const ;
|
||||
|
||||
virtual ~G4DisplacedSolid() ;
|
||||
|
||||
public: // without description
|
||||
|
||||
// It also has all the methods that a solid requires, eg.
|
||||
|
||||
EInside Inside( const G4ThreeVector& p ) const ;
|
||||
|
||||
G4bool CalculateExtent(const EAxis pAxis,
|
||||
const G4VoxelLimits& pVoxelLimit,
|
||||
const G4AffineTransform& pTransform,
|
||||
G4double& pMin, G4double& pMax) const ;
|
||||
|
||||
G4ThreeVector SurfaceNormal( const G4ThreeVector& p ) const ;
|
||||
|
||||
@@ -68,43 +81,46 @@ public:
|
||||
const G4int n,
|
||||
const G4VPhysicalVolume* pRep ) ;
|
||||
|
||||
public: // With description
|
||||
public: // with description
|
||||
|
||||
virtual G4GeometryType GetEntityType() const
|
||||
{ return G4String("G4DisplacedSolid"); }
|
||||
virtual G4GeometryType GetEntityType() const;
|
||||
|
||||
// If the Solid is a "G4DisplacedSolid", return a self pointer
|
||||
// else return 0
|
||||
virtual const G4DisplacedSolid* GetDisplacedSolidPtr() const ;
|
||||
virtual G4DisplacedSolid* GetDisplacedSolidPtr();
|
||||
// If the Solid is a "G4DisplacedSolid",
|
||||
// return a self pointer else return 0.
|
||||
|
||||
// Access methods
|
||||
G4VSolid* GetConstituentMovedSolid();
|
||||
G4VSolid* GetConstituentMovedSolid() const;
|
||||
G4AffineTransform GetTransform() const;
|
||||
G4AffineTransform GetDirectTransform() const;
|
||||
|
||||
// Get the rotation/translation, as applied to the frame of reference
|
||||
// Access methods.
|
||||
|
||||
G4RotationMatrix GetFrameRotation() const;
|
||||
G4ThreeVector GetFrameTranslation() const;
|
||||
// Get the rotation/translation, as applied to the frame of reference.
|
||||
|
||||
// Get the rotation/translation, as applied to the object
|
||||
G4RotationMatrix GetObjectRotation() const;
|
||||
G4ThreeVector GetObjectTranslation() const;
|
||||
// Get the rotation/translation, as applied to the object.
|
||||
|
||||
public: // without description
|
||||
|
||||
public:
|
||||
// For creating graphical representations (ie for visualisation)
|
||||
void DescribeYourselfTo ( G4VGraphicsScene& scene ) const ;
|
||||
G4VisExtent GetExtent () const ;
|
||||
G4Polyhedron* CreatePolyhedron () const ;
|
||||
G4NURBS* CreateNURBS () const ;
|
||||
// For creating graphical representations (ie for visualisation).
|
||||
|
||||
protected:
|
||||
G4VSolid* fPtrSolid ;
|
||||
G4AffineTransform* fPtrTransform ;
|
||||
G4AffineTransform* fDirectTransform ;
|
||||
protected:
|
||||
|
||||
G4VSolid* fPtrSolid ;
|
||||
G4AffineTransform* fPtrTransform ;
|
||||
G4AffineTransform* fDirectTransform ;
|
||||
|
||||
private:
|
||||
|
||||
} ;
|
||||
|
||||
inline G4GeometryType G4DisplacedSolid::GetEntityType() const
|
||||
{
|
||||
return G4String("G4DisplacedSolid");
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,5 +1,20 @@
|
||||
// Class for description of intersection of two CSG solids
|
||||
// This code implementation is the intellectual property of
|
||||
// the GEANT4 collaboration.
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4IntersectionSolid.hh,v 1.3 2000/04/27 09:59:36 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
//
|
||||
//
|
||||
// class G4IntersectionSolid
|
||||
//
|
||||
// Class description:
|
||||
//
|
||||
// Class for description of intersection of two CSG solids.
|
||||
|
||||
// History:
|
||||
//
|
||||
// 12.09.98 V. Grichine, initial design according to J.Apostolakis's
|
||||
@@ -11,38 +26,41 @@
|
||||
|
||||
#include "G4BooleanSolid.hh"
|
||||
#include "G4VSolid.hh"
|
||||
// #include "G4PlacedSolid.hh"
|
||||
|
||||
#include "G4RotationMatrix.hh"
|
||||
#include "G4ThreeVector.hh"
|
||||
#include "G4Transform3D.hh"
|
||||
#include "G4AffineTransform.hh"
|
||||
|
||||
class G4IntersectionSolid: public G4BooleanSolid
|
||||
class G4IntersectionSolid : public G4BooleanSolid
|
||||
{
|
||||
public:
|
||||
G4IntersectionSolid( const G4String& pName,
|
||||
G4VSolid* pSolidA ,
|
||||
G4VSolid* pSolidB ) ;
|
||||
public: // with description
|
||||
|
||||
G4IntersectionSolid( const G4String& pName,
|
||||
G4VSolid* pSolidA ,
|
||||
G4VSolid* pSolidB,
|
||||
G4RotationMatrix* rotMatrix,
|
||||
const G4ThreeVector& transVector ) ;
|
||||
G4IntersectionSolid( const G4String& pName,
|
||||
G4VSolid* pSolidA ,
|
||||
G4VSolid* pSolidB ) ;
|
||||
|
||||
G4IntersectionSolid( const G4String& pName,
|
||||
G4VSolid* pSolidA ,
|
||||
G4VSolid* pSolidB,
|
||||
const G4Transform3D& transform ) ;
|
||||
G4IntersectionSolid( const G4String& pName,
|
||||
G4VSolid* pSolidA ,
|
||||
G4VSolid* pSolidB,
|
||||
G4RotationMatrix* rotMatrix,
|
||||
const G4ThreeVector& transVector ) ;
|
||||
|
||||
virtual ~G4IntersectionSolid() ;
|
||||
G4IntersectionSolid( const G4String& pName,
|
||||
G4VSolid* pSolidA ,
|
||||
G4VSolid* pSolidB,
|
||||
const G4Transform3D& transform ) ;
|
||||
|
||||
virtual ~G4IntersectionSolid() ;
|
||||
|
||||
G4bool CalculateExtent(const EAxis pAxis,
|
||||
const G4VoxelLimits& pVoxelLimit,
|
||||
const G4AffineTransform& pTransform,
|
||||
G4double& pMin, G4double& pMax) const ;
|
||||
virtual G4GeometryType GetEntityType() const;
|
||||
|
||||
public: // without description
|
||||
|
||||
G4bool CalculateExtent( const EAxis pAxis,
|
||||
const G4VoxelLimits& pVoxelLimit,
|
||||
const G4AffineTransform& pTransform,
|
||||
G4double& pMin, G4double& pMax) const ;
|
||||
|
||||
EInside Inside( const G4ThreeVector& p ) const ;
|
||||
|
||||
@@ -66,19 +84,16 @@ public:
|
||||
const G4int n,
|
||||
const G4VPhysicalVolume* pRep ) ;
|
||||
|
||||
virtual G4GeometryType GetEntityType() const
|
||||
{ return G4String("G4IntersectionSolid"); }
|
||||
|
||||
void DescribeYourselfTo ( G4VGraphicsScene& scene ) const ;
|
||||
G4VisExtent GetExtent () const ;
|
||||
G4Polyhedron* CreatePolyhedron () const ;
|
||||
G4NURBS* CreateNURBS () const ;
|
||||
|
||||
protected:
|
||||
|
||||
private:
|
||||
|
||||
} ;
|
||||
|
||||
inline G4GeometryType G4IntersectionSolid::GetEntityType() const
|
||||
{
|
||||
return G4String("G4IntersectionSolid");
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,16 +1,30 @@
|
||||
// Class for description of subtraction of two CSG solids: A - B !!!
|
||||
// This code implementation is the intellectual property of
|
||||
// the GEANT4 collaboration.
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4SubtractionSolid.hh,v 1.3 2000/04/27 09:59:37 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
//
|
||||
//
|
||||
// class G4SubtractionSolid
|
||||
//
|
||||
// Class description:
|
||||
//
|
||||
// Class for description of subtraction of two CSG solids: A - B.
|
||||
|
||||
// History:
|
||||
//
|
||||
// 14.10.98 V.Grichine - first implementation
|
||||
//
|
||||
// 14.10.98 V.Grichine - first implementation.
|
||||
|
||||
|
||||
#ifndef G4SUBTRACTIONSOLID_HH
|
||||
#define G4SUBTRACTIONSOLID_HH
|
||||
|
||||
#include "G4BooleanSolid.hh"
|
||||
#include "G4VSolid.hh"
|
||||
// #include "G4PlacedSolid.hh"
|
||||
|
||||
#include "G4RotationMatrix.hh"
|
||||
#include "G4ThreeVector.hh"
|
||||
@@ -18,29 +32,32 @@
|
||||
#include "G4AffineTransform.hh"
|
||||
|
||||
|
||||
|
||||
class G4SubtractionSolid: public G4BooleanSolid
|
||||
class G4SubtractionSolid : public G4BooleanSolid
|
||||
{
|
||||
public:
|
||||
G4SubtractionSolid( const G4String& pName,
|
||||
G4VSolid* pSolidA ,
|
||||
G4VSolid* pSolidB ) ;
|
||||
public: // with description
|
||||
|
||||
G4SubtractionSolid( const G4String& pName,
|
||||
G4VSolid* pSolidA ,
|
||||
G4VSolid* pSolidB ,
|
||||
G4RotationMatrix* rotMatrix,
|
||||
const G4ThreeVector& transVector ) ;
|
||||
G4SubtractionSolid( const G4String& pName,
|
||||
G4VSolid* pSolidA ,
|
||||
G4VSolid* pSolidB ) ;
|
||||
|
||||
G4SubtractionSolid( const G4String& pName,
|
||||
G4VSolid* pSolidA ,
|
||||
G4VSolid* pSolidB ,
|
||||
const G4Transform3D& transform ) ;
|
||||
G4SubtractionSolid( const G4String& pName,
|
||||
G4VSolid* pSolidA ,
|
||||
G4VSolid* pSolidB ,
|
||||
G4RotationMatrix* rotMatrix,
|
||||
const G4ThreeVector& transVector ) ;
|
||||
|
||||
virtual ~G4SubtractionSolid() ;
|
||||
G4SubtractionSolid( const G4String& pName,
|
||||
G4VSolid* pSolidA ,
|
||||
G4VSolid* pSolidB ,
|
||||
const G4Transform3D& transform ) ;
|
||||
|
||||
virtual ~G4SubtractionSolid() ;
|
||||
|
||||
G4bool CalculateExtent(const EAxis pAxis,
|
||||
virtual G4GeometryType GetEntityType() const ;
|
||||
|
||||
public: // without description
|
||||
|
||||
G4bool CalculateExtent( const EAxis pAxis,
|
||||
const G4VoxelLimits& pVoxelLimit,
|
||||
const G4AffineTransform& pTransform,
|
||||
G4double& pMin, G4double& pMax) const ;
|
||||
@@ -67,19 +84,16 @@ public:
|
||||
const G4int n,
|
||||
const G4VPhysicalVolume* pRep ) ;
|
||||
|
||||
virtual G4GeometryType GetEntityType() const
|
||||
{ return G4String("G4SubtractionSolid"); }
|
||||
|
||||
void DescribeYourselfTo ( G4VGraphicsScene& scene ) const ;
|
||||
G4VisExtent GetExtent () const ;
|
||||
G4Polyhedron* CreatePolyhedron () const ;
|
||||
G4NURBS* CreateNURBS () const ;
|
||||
|
||||
protected:
|
||||
};
|
||||
|
||||
private:
|
||||
|
||||
} ;
|
||||
inline G4GeometryType G4SubtractionSolid::GetEntityType() const
|
||||
{
|
||||
return G4String("G4SubtractionSolid");
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,47 +1,64 @@
|
||||
// Class for description of intersection of two CSG solids
|
||||
// This code implementation is the intellectual property of
|
||||
// the GEANT4 collaboration.
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4UnionSolid.hh,v 1.4 2000/04/27 09:59:37 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
//
|
||||
//
|
||||
// class G4UnionSolid
|
||||
//
|
||||
// Class description:
|
||||
//
|
||||
// Class for description of union of two CSG solids.
|
||||
|
||||
// History:
|
||||
//
|
||||
// 12.09.98 V.Grichine
|
||||
//
|
||||
// 12.09.98 V.Grichine, created.
|
||||
|
||||
#ifndef G4UNIONSOLID_HH
|
||||
#define G4UNIONSOLID_HH
|
||||
|
||||
#include "G4BooleanSolid.hh"
|
||||
#include "G4VSolid.hh"
|
||||
// #include "G4PlacedSolid.hh"
|
||||
|
||||
#include "G4RotationMatrix.hh"
|
||||
#include "G4ThreeVector.hh"
|
||||
#include "G4Transform3D.hh"
|
||||
#include "G4AffineTransform.hh"
|
||||
|
||||
class G4UnionSolid: public G4BooleanSolid
|
||||
class G4UnionSolid : public G4BooleanSolid
|
||||
{
|
||||
public:
|
||||
G4UnionSolid( const G4String& pName,
|
||||
G4VSolid* pSolidA ,
|
||||
G4VSolid* pSolidB ) ;
|
||||
public: // with description
|
||||
|
||||
G4UnionSolid( const G4String& pName,
|
||||
G4VSolid* pSolidA ,
|
||||
G4VSolid* pSolidB ,
|
||||
G4RotationMatrix* rotMatrix,
|
||||
const G4ThreeVector& transVector ) ;
|
||||
G4UnionSolid( const G4String& pName,
|
||||
G4VSolid* pSolidA ,
|
||||
G4VSolid* pSolidB ) ;
|
||||
|
||||
G4UnionSolid( const G4String& pName,
|
||||
G4VSolid* pSolidA ,
|
||||
G4VSolid* pSolidB ,
|
||||
const G4Transform3D& transform ) ;
|
||||
G4UnionSolid( const G4String& pName,
|
||||
G4VSolid* pSolidA ,
|
||||
G4VSolid* pSolidB ,
|
||||
G4RotationMatrix* rotMatrix,
|
||||
const G4ThreeVector& transVector ) ;
|
||||
|
||||
virtual ~G4UnionSolid() ;
|
||||
G4UnionSolid( const G4String& pName,
|
||||
G4VSolid* pSolidA ,
|
||||
G4VSolid* pSolidB ,
|
||||
const G4Transform3D& transform ) ;
|
||||
|
||||
virtual ~G4UnionSolid() ;
|
||||
|
||||
G4bool CalculateExtent(const EAxis pAxis,
|
||||
const G4VoxelLimits& pVoxelLimit,
|
||||
const G4AffineTransform& pTransform,
|
||||
G4double& pMin, G4double& pMax) const ;
|
||||
virtual G4GeometryType GetEntityType() const ;
|
||||
|
||||
public: // without description
|
||||
|
||||
G4bool CalculateExtent( const EAxis pAxis,
|
||||
const G4VoxelLimits& pVoxelLimit,
|
||||
const G4AffineTransform& pTransform,
|
||||
G4double& pMin, G4double& pMax) const ;
|
||||
|
||||
EInside Inside( const G4ThreeVector& p ) const ;
|
||||
|
||||
@@ -65,19 +82,16 @@ public:
|
||||
const G4int n,
|
||||
const G4VPhysicalVolume* pRep ) ;
|
||||
|
||||
virtual G4GeometryType GetEntityType() const
|
||||
{ return G4String("G4UnionSolid"); }
|
||||
|
||||
void DescribeYourselfTo ( G4VGraphicsScene& scene ) const ;
|
||||
G4VisExtent GetExtent () const ;
|
||||
G4Polyhedron* CreatePolyhedron () const ;
|
||||
G4NURBS* CreateNURBS () const ;
|
||||
|
||||
protected:
|
||||
};
|
||||
|
||||
private:
|
||||
|
||||
} ;
|
||||
inline G4GeometryType G4UnionSolid::GetEntityType() const
|
||||
{
|
||||
return G4String("G4UnionSolid");
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user