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: G4CurvePoint.hh,v 1.6 2006/06/29 18:39:00 gunter Exp $ |
---|
28 | // GEANT4 tag $Name: geant4-09-03 $ |
---|
29 | // |
---|
30 | // ---------------------------------------------------------------------- |
---|
31 | // Class G4CurvePoint |
---|
32 | // |
---|
33 | // Class Description: |
---|
34 | // |
---|
35 | // Class capable of storing both the parametric and the non-parametric |
---|
36 | // representation of a point on a curve. |
---|
37 | // The representation is evaluated lazily for efficiency. |
---|
38 | |
---|
39 | // Author: J.Sulkimo, P.Urban. |
---|
40 | // Revisions by: L.Broglia, G.Cosmo. |
---|
41 | // ---------------------------------------------------------------------- |
---|
42 | #ifndef included_G4CurvePoint |
---|
43 | #define included_G4CurvePoint |
---|
44 | |
---|
45 | #include "G4Curve.hh" |
---|
46 | #include "G4Point3D.hh" |
---|
47 | |
---|
48 | class G4CurvePoint |
---|
49 | { |
---|
50 | |
---|
51 | public: // with description |
---|
52 | |
---|
53 | G4CurvePoint(G4Curve& c0); |
---|
54 | // Constructor, taking a curve as argument. |
---|
55 | |
---|
56 | virtual ~G4CurvePoint(); |
---|
57 | // Empty destructor. |
---|
58 | |
---|
59 | G4CurvePoint(const G4CurvePoint& cp); |
---|
60 | G4CurvePoint& operator=(const G4CurvePoint& cp); |
---|
61 | // Copy constructor and assignment operator. |
---|
62 | |
---|
63 | inline void Init(G4Curve& c0); |
---|
64 | // Initialises a G4CurvePoint. Called by the constructor. |
---|
65 | |
---|
66 | inline G4Curve& GetCurve() const; |
---|
67 | // Returns the curve which the point belongs to. |
---|
68 | |
---|
69 | inline void Reset(); |
---|
70 | inline void Reset(G4double u0); |
---|
71 | inline void Reset(const G4Point3D& p0); |
---|
72 | inline void Reset(G4double u0, const G4Point3D& p0); |
---|
73 | // Resets point's attributes. |
---|
74 | |
---|
75 | inline G4double GetPPoint(); |
---|
76 | inline const G4Point3D& GetPoint(); |
---|
77 | // Returns point as parameter or as point in space. |
---|
78 | |
---|
79 | protected: |
---|
80 | |
---|
81 | G4CurvePoint(); |
---|
82 | // Protected default constructor. |
---|
83 | |
---|
84 | protected: |
---|
85 | |
---|
86 | // data |
---|
87 | |
---|
88 | G4Curve* c; |
---|
89 | |
---|
90 | G4Point3D p; |
---|
91 | G4double u; |
---|
92 | |
---|
93 | G4int notComputed; |
---|
94 | static const G4int pFlag; |
---|
95 | static const G4int uFlag; |
---|
96 | static const G4int allFlags; |
---|
97 | |
---|
98 | }; |
---|
99 | |
---|
100 | #include "G4CurvePoint.icc" |
---|
101 | |
---|
102 | #endif |
---|