source: trunk/source/geometry/solids/BREPS/include/G4CurvePoint.icc @ 850

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

geant4.8.2 beta

File size: 2.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: G4CurvePoint.icc,v 1.4 2006/06/29 18:39:03 gunter Exp $
28// GEANT4 tag $Name: HEAD $
29//
30// --------------------------------------------------------------------
31// GEANT 4 inline definitions file
32//
33// G4CurvePoint.icc
34//
35// Implementation of inline methods of G4CurvePoint
36// --------------------------------------------------------------------
37
38inline
39void G4CurvePoint::Init(G4Curve& c0)
40{
41  c= &c0;
42  notComputed= allFlags;
43}
44
45inline
46G4Curve& G4CurvePoint::GetCurve() const
47{
48  return *c;
49}
50
51/////////////////////////////////////////////////////////////////////////////
52
53inline
54void G4CurvePoint::Reset()
55{
56  notComputed= allFlags;
57}
58
59inline
60void G4CurvePoint::Reset(G4double u0)
61{
62  u= u0;
63  notComputed= pFlag;
64}
65
66inline
67void G4CurvePoint::Reset(const G4Point3D& p0)
68{
69  p= p0;
70  notComputed= uFlag;
71}
72
73inline
74void G4CurvePoint::Reset(G4double u0, const G4Point3D& p0)
75{
76  u= u0;
77  p= p0;
78  notComputed= 0;
79}
80
81/////////////////////////////////////////////////////////////////////////////
82
83inline
84G4double G4CurvePoint::GetPPoint()
85{
86  if (notComputed & uFlag) {
87    u= c->GetPPoint(p);
88    notComputed &= ~uFlag;
89  }
90  return u;
91}
92
93inline
94const G4Point3D& G4CurvePoint::GetPoint()
95{
96  if (notComputed & pFlag) {
97    p= c->GetPoint(u);
98    notComputed &= ~pFlag;
99  }
100  return p;
101}
Note: See TracBrowser for help on using the repository browser.