source: trunk/source/geometry/solids/BREPS/include/G4CurveRayIntersection.hh@ 921

Last change on this file since 921 was 850, checked in by garnier, 17 years ago

geant4.8.2 beta

File size: 3.9 KB
Line 
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: G4CurveRayIntersection.hh,v 1.6 2007/05/11 13:49:31 gcosmo Exp $
28// GEANT4 tag $Name: HEAD $
29//
30// ----------------------------------------------------------------------
31// Class G4CurveRayIntersection
32//
33// Class Description:
34//
35// Class capable of storing both the parametric and the non-parametric
36// representation of a intersection point on a curve. It's subclassed
37// from G4CurvePoint.
38
39// Author: J.Sulkimo, P.Urban.
40// Revisions by: L.Broglia, G.Cosmo.
41// ----------------------------------------------------------------------
42#ifndef included_G4CurveRayIntersection
43#define included_G4CurveRayIntersection
44
45#include "G4CurvePoint.hh"
46#include "G4Ray.hh"
47
48class G4CurveRayIntersection : public G4CurvePoint
49{
50
51public: // with description
52
53 G4CurveRayIntersection();
54 // Default constructor. Sets only distance to infinity.
55 // Must be followed by Init!
56
57 G4CurveRayIntersection(G4Curve& c0, const G4Ray& r0);
58 // Constructor taking a curve and a ray.
59
60 ~G4CurveRayIntersection();
61 // Empty destructor.
62
63 G4CurveRayIntersection(const G4CurveRayIntersection& cr);
64 G4CurveRayIntersection& operator=(const G4CurveRayIntersection& cr);
65 // Copy constructor and assignment operator.
66
67 inline void Init(G4Curve& c0, const G4Ray& r0);
68 // Initialises a G4CurveRayIntersection. Called by the constructor above.
69
70 inline const G4Ray& GetRay() const;
71 // Returns the ray of intersection.
72
73 inline void Reset();
74 inline void ResetPPoint(G4double u0);
75 inline void Reset(const G4Point3D& p0);
76 inline void Reset(G4double u0, const G4Point3D& p0);
77 inline void ResetDistance(G4double d0);
78 inline void Reset(G4double u0, G4double d0);
79 inline void Reset(const G4Point3D& p0, G4double d0);
80 inline void Reset(G4double u0, const G4Point3D& p0, G4double d0);
81 // Resets point's attributes.
82
83 inline G4double GetPPoint();
84 inline const G4Point3D& GetPoint();
85 // Returns point as parameter or as point in space.
86
87 inline G4double GetDistance();
88 // Returns intersection's distance.
89
90public: // without description
91
92 // additional functionalities
93
94 inline void Update(G4CurveRayIntersection& is);
95 inline void UpdateWithPointOnCurve(G4CurveRayIntersection& is);
96
97protected:
98
99 // data
100
101 const G4Ray* r;
102 G4double d;
103 G4double kCarTolerance;
104 static const G4int dFlag;
105
106};
107
108#include "G4CurveRayIntersection.icc"
109
110#endif
Note: See TracBrowser for help on using the repository browser.