Import Geant4 9.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 15:16:48 +02:00
parent 75c7fd177d
commit a8e9364cea
6592 changed files with 84274 additions and 69292 deletions
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4AuxiliaryNavServices.icc,v 1.3 2006/06/29 18:35:34 gunter Exp $
// GEANT4 tag $Name: geant4-08-02 $
// $Id: G4AuxiliaryNavServices.icc,v 1.4 2007/05/22 07:48:08 gcosmo Exp $
// GEANT4 tag $Name: geant4-09-00 $
//
//
// class G4AuxiliaryNavServices Inline implementation
@@ -86,3 +86,51 @@ CheckPointOnSurface( const G4VSolid* sampleSolid,
}
return enter;
}
// --------------------------------------------------------------------
inline G4bool
G4AuxiliaryNavServices::
CheckPointExiting( const G4VSolid* sampleSolid,
const G4ThreeVector& localPoint,
const G4ThreeVector* globalDirection,
const G4AffineTransform& sampleTransform )
{
if( !globalDirection ) { return false; }
G4ThreeVector localDirection, sampleNormal;
G4bool exiting = false;
EInside insideSolid = sampleSolid->Inside(localPoint);
if( (insideSolid==kSurface) )
{
localDirection= sampleTransform.TransformAxis(*globalDirection);
// Check whether we are exiting the volume
//
sampleNormal = sampleSolid->SurfaceNormal(localPoint);
if ( sampleNormal.dot(localDirection) >= 0 )
{
if( sampleNormal.dot(localDirection) == 0 )
{
// We can't decide yet, let's make sure we're entering the solid.
// If by a confusion we entered the next solid we find out now
// whether to leave or to exiting.
// This happens when we're on the surface or edge shared by two
// solids
//
G4double distanceToIn =
sampleSolid->DistanceToIn( localPoint, localDirection );
if( distanceToIn != kInfinity )
{
exiting = true;
}
}
else
{
exiting = true;
}
}
}
return exiting;
}