source: trunk/source/geometry/navigation/src/G4GeomTestPoint.cc@ 1232

Last change on this file since 1232 was 1228, checked in by garnier, 16 years ago

update geant4.9.3 tag

File size: 3.2 KB
RevLine 
[831]1//
2// ********************************************************************
3// * License and Disclaimer *
4// * *
5// * The Geant4 software is copyright of the Copyright Holders of *
6// * the Geant4 Collaboration. It is provided under the terms and *
7// * conditions of the Geant4 Software License, included in the file *
8// * LICENSE and available at http://cern.ch/geant4/license . These *
9// * include a list of copyright holders. *
10// * *
11// * Neither the authors of this software system, nor their employing *
12// * institutes,nor the agencies providing financial support for this *
13// * work make any representation or warranty, express or implied, *
14// * regarding this software system or assume any liability for its *
15// * use. Please see the license in the file LICENSE and URL above *
16// * for the full disclaimer and the limitation of liability. *
17// * *
18// * This code implementation is the result of the scientific and *
19// * technical work of the GEANT4 collaboration. *
20// * By using, copying, modifying or distributing the software (or *
21// * any work based on the software) you agree to acknowledge its *
22// * use in resulting scientific publications, and indicate your *
23// * acceptance of all terms of the Geant4 Software license. *
24// ********************************************************************
25//
26//
27// $Id: G4GeomTestPoint.cc,v 1.3 2006/06/29 18:36:44 gunter Exp $
[1228]28// GEANT4 tag $Name: geant4-09-03 $
[831]29//
30// --------------------------------------------------------------------
31// GEANT 4 class source file
32//
33// G4GeomTestPoint
34//
35// Author: D.C.Williams, UCSC (davidw@scipp.ucsc.edu)
36// --------------------------------------------------------------------
37
38#include "G4GeomTestPoint.hh"
39
40
41//
42// Default constructor
43//
44G4GeomTestPoint::G4GeomTestPoint()
45 : p(0),
46 s(0),
47 entering(false)
48{;}
49
50
51//
52// Specific constructor
53//
54G4GeomTestPoint::G4GeomTestPoint( const G4ThreeVector &thePoint,
55 G4double theS,
56 G4bool isEntering )
57 : p(thePoint),
58 s(theS),
59 entering(isEntering)
60{;}
61
62
63//
64// Copy constructor
65//
66G4GeomTestPoint::G4GeomTestPoint( const G4GeomTestPoint &other )
67 : p(other.p),
68 s(other.s),
69 entering(other.entering)
70{;}
71
72
73//
74// Destructor
75//
76G4GeomTestPoint::~G4GeomTestPoint() {;}
77
78
79//
80// Equivalence operator
81//
82G4bool G4GeomTestPoint::operator==( const G4GeomTestPoint &other ) const
83{
84 return s == other.s;
85}
86
87
88//
89// Order operators
90//
91G4bool G4GeomTestPoint::operator<( const G4GeomTestPoint &other ) const
92{
93 return s < other.s;
94}
95
96G4bool G4GeomTestPoint::operator<=( const G4GeomTestPoint &other ) const
97{
98 return s <= other.s;
99}
100
101
102//
103// Return position
104//
105const G4ThreeVector &G4GeomTestPoint::GetPosition() const
106{
107 return p;
108}
109
110
111//
112// Return distance
113//
114G4double G4GeomTestPoint::GetDistance() const
115{
116 return s;
117}
118
119
120//
121// Return true if point was entering
122//
123G4bool G4GeomTestPoint::Entering() const
124{
125 return entering;
126}
127
Note: See TracBrowser for help on using the repository browser.