Import Geant4 10.6.0 source tree
This commit is contained in:
@@ -23,18 +23,14 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
// class G4LineSection
|
||||
// G4LineSection
|
||||
//
|
||||
// Class description:
|
||||
//
|
||||
// A utility class that calculates the distance of a point from a
|
||||
// line section.
|
||||
|
||||
// History:
|
||||
// - Created. J. Apostolakis.
|
||||
// Created: J.Apostolakis, 1999
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
#ifndef G4LineSection_hh
|
||||
@@ -47,7 +43,8 @@ class G4LineSection
|
||||
{
|
||||
public: // with description
|
||||
|
||||
inline G4LineSection( const G4ThreeVector& PntA, const G4ThreeVector& PntB );
|
||||
G4LineSection( const G4ThreeVector& PntA,
|
||||
const G4ThreeVector& PntB );
|
||||
|
||||
G4double Dist( G4ThreeVector OtherPnt ) const;
|
||||
|
||||
@@ -58,21 +55,13 @@ class G4LineSection
|
||||
const G4ThreeVector& LinePntB );
|
||||
private:
|
||||
|
||||
G4ThreeVector EndpointA;
|
||||
G4ThreeVector VecAtoB;
|
||||
G4double fABdistanceSq ;
|
||||
G4ThreeVector EndpointA;
|
||||
G4ThreeVector VecAtoB;
|
||||
G4double fABdistanceSq = 0.0;
|
||||
};
|
||||
|
||||
// Inline methods implementations
|
||||
|
||||
inline
|
||||
G4LineSection::G4LineSection( const G4ThreeVector& PntA,
|
||||
const G4ThreeVector& PntB )
|
||||
: EndpointA(PntA), VecAtoB(PntB-PntA)
|
||||
{
|
||||
fABdistanceSq = VecAtoB.mag2();
|
||||
}
|
||||
|
||||
inline
|
||||
G4double G4LineSection::GetABdistanceSq() const
|
||||
{
|
||||
@@ -81,8 +70,8 @@ G4double G4LineSection::GetABdistanceSq() const
|
||||
|
||||
inline
|
||||
G4double G4LineSection::Distline( const G4ThreeVector& OtherPnt,
|
||||
const G4ThreeVector& LinePntA,
|
||||
const G4ThreeVector& LinePntB )
|
||||
const G4ThreeVector& LinePntA,
|
||||
const G4ThreeVector& LinePntB )
|
||||
{
|
||||
G4LineSection LineAB( LinePntA, LinePntB ); // Line from A to B
|
||||
return LineAB.Dist( OtherPnt );
|
||||
|
||||
Reference in New Issue
Block a user