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 G4CurvePoint 00031 // 00032 // Class Description: 00033 // 00034 // Class capable of storing both the parametric and the non-parametric 00035 // representation of a point on a curve. 00036 // The representation is evaluated lazily for efficiency. 00037 00038 // Author: J.Sulkimo, P.Urban. 00039 // Revisions by: L.Broglia, G.Cosmo. 00040 // ---------------------------------------------------------------------- 00041 #ifndef included_G4CurvePoint 00042 #define included_G4CurvePoint 00043 00044 #include "G4Curve.hh" 00045 #include "G4Point3D.hh" 00046 00047 class G4CurvePoint 00048 { 00049 00050 public: // with description 00051 00052 G4CurvePoint(G4Curve& c0); 00053 // Constructor, taking a curve as argument. 00054 00055 virtual ~G4CurvePoint(); 00056 // Empty destructor. 00057 00058 G4CurvePoint(const G4CurvePoint& cp); 00059 G4CurvePoint& operator=(const G4CurvePoint& cp); 00060 // Copy constructor and assignment operator. 00061 00062 inline void Init(G4Curve& c0); 00063 // Initialises a G4CurvePoint. Called by the constructor. 00064 00065 inline G4Curve& GetCurve() const; 00066 // Returns the curve which the point belongs to. 00067 00068 inline void Reset(); 00069 inline void Reset(G4double u0); 00070 inline void Reset(const G4Point3D& p0); 00071 inline void Reset(G4double u0, const G4Point3D& p0); 00072 // Resets point's attributes. 00073 00074 inline G4double GetPPoint(); 00075 inline const G4Point3D& GetPoint(); 00076 // Returns point as parameter or as point in space. 00077 00078 protected: 00079 00080 G4CurvePoint(); 00081 // Protected default constructor. 00082 00083 protected: 00084 00085 // data 00086 00087 G4Curve* c; 00088 00089 G4Point3D p; 00090 G4double u; 00091 00092 G4int notComputed; 00093 static const G4int pFlag; 00094 static const G4int uFlag; 00095 static const G4int allFlags; 00096 00097 }; 00098 00099 #include "G4CurvePoint.icc" 00100 00101 #endif