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 // Class G4PointRat 00031 // 00032 // Class description: 00033 // 00034 // A G4PointRat object is composed of: 00035 // - a point in 3D space (G4Point3D) 00036 // - a scale factor (set to 1 by default) 00037 00038 // Authors: J.Sulkimo, P.Urban. 00039 // Revisions by: A.Floquet, L.Broglia, G.Cosmo. 00040 // ---------------------------------------------------------------------- 00041 #ifndef __G4POINT_RAT 00042 #define __G4POINT_RAT 00043 00044 #include "geomdefs.hh" // For kInfinity 00045 00046 #include "G4Point3D.hh" 00047 #include "G4Plane3D.hh" 00048 00049 #define SQRT_SMALL_FASTF 1.0e-18 00050 #define SMALL SQRT_SMALL_FASTF 00051 #define ROW 0 00052 #define COL 1 00053 00054 const G4Point3D PINFINITY(kInfinity, kInfinity, kInfinity); 00055 00056 class G4PointRat 00057 { 00058 00059 public: // with description 00060 00061 G4PointRat(); 00062 ~G4PointRat(); 00063 // Constructor & destructor. 00064 00065 G4PointRat(const G4Point3D&); 00066 // Copy constructor. 00067 00068 G4PointRat& operator=(const G4Point3D&); 00069 G4PointRat& operator=(const G4PointRat&); 00070 // Overloaded assignment operators. 00071 00072 inline G4double x() const; 00073 inline void setX (G4double Value); 00074 inline G4double y() const; 00075 inline void setY (G4double Value); 00076 inline G4double z() const; 00077 inline void setZ (G4double Value); 00078 inline G4double w() const; 00079 inline void setW(G4double Value); 00080 inline G4Point3D pt() const; 00081 // Get/Set methods for attributes. 00082 00083 inline G4double PlaneDistance(const G4Plane3D& Pl) const; 00084 // Returns distance from a given plane. 00085 00086 public: // without description 00087 00088 G4int GetType(void) const; // This function should be removed 00089 // if calls to this are also removed 00090 00091 private: 00092 00093 G4Point3D pt3d; 00094 G4double s; 00095 }; 00096 00097 #include "G4PointRat.icc" 00098 00099 #endif