00001 // 00002 // ******************************************************************** 00003 // * License and Disclaimer * 00004 // * * 00005 // * The Geant4 software is copyright of the Copyright Holders of * 00006 // * the Geant4 Collaboration. It is provided under the terms and * 00007 // * conditions of the Geant4 Software License, included in the file * 00008 // * LICENSE and available at http://cern.ch/geant4/license . These * 00009 // * include a list of copyright holders. * 00010 // * * 00011 // * Neither the authors of this software system, nor their employing * 00012 // * institutes,nor the agencies providing financial support for this * 00013 // * work make any representation or warranty, express or implied, * 00014 // * regarding this software system or assume any liability for its * 00015 // * use. Please see the license in the file LICENSE and URL above * 00016 // * for the full disclaimer and the limitation of liability. * 00017 // * * 00018 // * This code implementation is the result of the scientific and * 00019 // * technical work of the GEANT4 collaboration. * 00020 // * By using, copying, modifying or distributing the software (or * 00021 // * any work based on the software) you agree to acknowledge its * 00022 // * use in resulting scientific publications, and indicate your * 00023 // * acceptance of all terms of the Geant4 Software license. * 00024 // ******************************************************************** 00025 // 00026 // 00027 // $Id$ 00028 // 00029 // -------------------------------------------------------------------- 00030 // GEANT 4 class source file 00031 // 00032 // G4GeomTestPoint 00033 // 00034 // Author: D.C.Williams, UCSC (davidw@scipp.ucsc.edu) 00035 // -------------------------------------------------------------------- 00036 00037 #include "G4GeomTestPoint.hh" 00038 00039 00040 // 00041 // Default constructor 00042 // 00043 G4GeomTestPoint::G4GeomTestPoint() 00044 : p(0), 00045 s(0), 00046 entering(false) 00047 {;} 00048 00049 00050 // 00051 // Specific constructor 00052 // 00053 G4GeomTestPoint::G4GeomTestPoint( const G4ThreeVector &thePoint, 00054 G4double theS, 00055 G4bool isEntering ) 00056 : p(thePoint), 00057 s(theS), 00058 entering(isEntering) 00059 {;} 00060 00061 00062 // 00063 // Copy constructor 00064 // 00065 G4GeomTestPoint::G4GeomTestPoint( const G4GeomTestPoint &other ) 00066 : p(other.p), 00067 s(other.s), 00068 entering(other.entering) 00069 {;} 00070 00071 00072 // 00073 // Destructor 00074 // 00075 G4GeomTestPoint::~G4GeomTestPoint() {;} 00076 00077 // 00078 // Assignment operator 00079 // 00080 G4GeomTestPoint& G4GeomTestPoint::operator=(const G4GeomTestPoint& other) 00081 { 00082 // Check assignment to self 00083 // 00084 if (this == &other) { return *this; } 00085 00086 // Copy data 00087 // 00088 p = other.p; 00089 s = other.s; 00090 entering = other.entering; 00091 00092 return *this; 00093 } 00094 00095 00096 // 00097 // Equivalence operator 00098 // 00099 G4bool G4GeomTestPoint::operator==( const G4GeomTestPoint &other ) const 00100 { 00101 return s == other.s; 00102 } 00103 00104 00105 // 00106 // Order operators 00107 // 00108 G4bool G4GeomTestPoint::operator<( const G4GeomTestPoint &other ) const 00109 { 00110 return s < other.s; 00111 } 00112 00113 G4bool G4GeomTestPoint::operator<=( const G4GeomTestPoint &other ) const 00114 { 00115 return s <= other.s; 00116 } 00117 00118 00119 // 00120 // Return position 00121 // 00122 const G4ThreeVector &G4GeomTestPoint::GetPosition() const 00123 { 00124 return p; 00125 } 00126 00127 00128 // 00129 // Return distance 00130 // 00131 G4double G4GeomTestPoint::GetDistance() const 00132 { 00133 return s; 00134 } 00135 00136 00137 // 00138 // Return true if point was entering 00139 // 00140 G4bool G4GeomTestPoint::Entering() const 00141 { 00142 return entering; 00143 } 00144