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 G4CurveRayIntersection 00031 // 00032 // Class Description: 00033 // 00034 // Class capable of storing both the parametric and the non-parametric 00035 // representation of a intersection point on a curve. It's subclassed 00036 // from G4CurvePoint. 00037 00038 // Author: J.Sulkimo, P.Urban. 00039 // Revisions by: L.Broglia, G.Cosmo. 00040 // ---------------------------------------------------------------------- 00041 #ifndef included_G4CurveRayIntersection 00042 #define included_G4CurveRayIntersection 00043 00044 #include "G4CurvePoint.hh" 00045 #include "G4Ray.hh" 00046 00047 class G4CurveRayIntersection : public G4CurvePoint 00048 { 00049 00050 public: // with description 00051 00052 G4CurveRayIntersection(); 00053 // Default constructor. Sets only distance to infinity. 00054 // Must be followed by Init! 00055 00056 G4CurveRayIntersection(G4Curve& c0, const G4Ray& r0); 00057 // Constructor taking a curve and a ray. 00058 00059 ~G4CurveRayIntersection(); 00060 // Empty destructor. 00061 00062 G4CurveRayIntersection(const G4CurveRayIntersection& cr); 00063 G4CurveRayIntersection& operator=(const G4CurveRayIntersection& cr); 00064 // Copy constructor and assignment operator. 00065 00066 inline void Init(G4Curve& c0, const G4Ray& r0); 00067 // Initialises a G4CurveRayIntersection. Called by the constructor above. 00068 00069 inline const G4Ray& GetRay() const; 00070 // Returns the ray of intersection. 00071 00072 inline void Reset(); 00073 inline void ResetPPoint(G4double u0); 00074 inline void Reset(const G4Point3D& p0); 00075 inline void Reset(G4double u0, const G4Point3D& p0); 00076 inline void ResetDistance(G4double d0); 00077 inline void Reset(G4double u0, G4double d0); 00078 inline void Reset(const G4Point3D& p0, G4double d0); 00079 inline void Reset(G4double u0, const G4Point3D& p0, G4double d0); 00080 // Resets point's attributes. 00081 00082 inline G4double GetPPoint(); 00083 inline const G4Point3D& GetPoint(); 00084 // Returns point as parameter or as point in space. 00085 00086 inline G4double GetDistance(); 00087 // Returns intersection's distance. 00088 00089 public: // without description 00090 00091 // additional functionalities 00092 00093 inline void Update(G4CurveRayIntersection& is); 00094 inline void UpdateWithPointOnCurve(G4CurveRayIntersection& is); 00095 00096 protected: 00097 00098 // data 00099 00100 const G4Ray* r; 00101 G4double d; 00102 G4double kCarTolerance; 00103 static const G4int dFlag; 00104 00105 }; 00106 00107 #include "G4CurveRayIntersection.icc" 00108 00109 #endif