Import Geant4 7.1.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 12:11:21 +02:00
parent 516dbf1a58
commit d93e1e39a9
5384 changed files with 125662 additions and 82444 deletions
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4UnionSolid.cc,v 1.25 2004/02/27 08:38:09 grichine Exp $
// GEANT4 tag $Name: geant4-07-00-cand-01 $
// $Id: G4UnionSolid.cc,v 1.29 2005/05/09 13:44:58 gcosmo Exp $
// GEANT4 tag $Name: geant4-07-01 $
//
// Implementation of methods for the class G4IntersectionSolid
//
@@ -130,25 +130,20 @@ G4UnionSolid::CalculateExtent( const EAxis pAxis,
EInside G4UnionSolid::Inside( const G4ThreeVector& p ) const
{
EInside positionA = fPtrSolidA->Inside(p) ;
EInside positionB = fPtrSolidB->Inside(p) ;
if( positionA == kInside || positionB == kInside )
{
return kInside ;
}
EInside positionA = fPtrSolidA->Inside(p);
EInside positionB = fPtrSolidB->Inside(p);
if( positionA == kInside || positionB == kInside ||
( positionA == kSurface && positionB == kSurface &&
( fPtrSolidA->SurfaceNormal(p) +
fPtrSolidB->SurfaceNormal(p) ).mag2() <
1000*kRadTolerance ) ) return kInside;
else
{
if((positionA != kInside && positionB == kSurface) ||
(positionB != kInside && positionA == kSurface) ||
(positionA == kSurface && positionB == kSurface) )
{
return kSurface ;
}
else
{
return kOutside ;
}
if( ( positionA != kInside && positionB == kSurface ) ||
( positionB != kInside && positionA == kSurface ) ||
( positionA == kSurface && positionB == kSurface ) ) return kSurface;
else return kOutside;
}
}
@@ -428,7 +423,7 @@ G4UnionSolid::ComputeDimensions( G4VPVParameterisation*,
void
G4UnionSolid::DescribeYourselfTo ( G4VGraphicsScene& scene ) const
{
scene.AddThis (*this);
scene.AddSolid (*this);
}
////////////////////////////////////////////////////
@@ -438,11 +433,9 @@ G4UnionSolid::DescribeYourselfTo ( G4VGraphicsScene& scene ) const
G4Polyhedron*
G4UnionSolid::CreatePolyhedron () const
{
G4Polyhedron* pA = fPtrSolidA->CreatePolyhedron();
G4Polyhedron* pB = fPtrSolidB->CreatePolyhedron();
G4Polyhedron* pA = fPtrSolidA->GetPolyhedron();
G4Polyhedron* pB = fPtrSolidB->GetPolyhedron();
G4Polyhedron* resultant = new G4Polyhedron (pA->add(*pB));
delete pB;
delete pA;
return resultant;
}