source: trunk/source/geometry/solids/BREPS/include/G4Line.hh @ 1337

Last change on this file since 1337 was 1337, checked in by garnier, 14 years ago

tag geant4.9.4 beta 1 + modifs locales

File size: 3.4 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: G4Line.hh,v 1.9 2006/06/29 18:39:44 gunter Exp $
28// GEANT4 tag $Name: geant4-09-04-beta-01 $
29//
30// ----------------------------------------------------------------------
31// Class G4Line
32//
33// Class description:
34//
35// Definition of a generic line.
36
37// Authors: J.Sulkimo, P.Urban.
38// Revisions by: L.Broglia, G.Cosmo.
39// ----------------------------------------------------------------------
40#ifndef __LINE_H
41#define __LINE_H
42
43#include "G4Curve.hh"
44
45class G4Line : public G4Curve
46{
47
48public:  // with description
49
50  G4Line();
51  virtual ~G4Line();
52    // Constructor & destructor.
53
54  G4Line(const G4Line& orig);
55  G4Line& operator=(const G4Line& right);
56    // Copy constructor and assignment operator.
57
58  G4Curve* Project(const G4Transform3D& tr =
59                   HepGeom::Transform3D::Identity);
60    // Transforms and projects the line.
61
62  G4bool Tangent(G4CurvePoint& cp, G4Vector3D& vec);
63    // Returns tangent to line at a given point, if existing.
64    // The tangent is computed from the 3D point representation.
65
66  inline G4double  GetPMax() const;
67  inline G4Point3D GetPoint(G4double param) const;
68  inline G4double  GetPPoint(const G4Point3D& pt) const;
69    // Accessors methods.
70
71  inline G4Point3D  GetPnt() const;
72  inline G4Vector3D GetDir() const;
73  inline void Init(const G4Point3D& pnt0, const G4Vector3D& dir0);
74    // Get/Set for the geometric data.
75
76public:  // without description
77
78  inline G4int IntersectRay2D(const G4Ray& ray);
79  // void IntersectRay2D(const G4Ray& ray, G4CurveRayIntersection& is);
80
81protected:
82
83  inline void InitBounded();
84
85private:
86 
87  // geometric data
88  G4Point3D  pnt;
89  G4Vector3D dir;
90  G4Vector3D invDir;   // dir / |dir|^2 always
91  G4Vector3D v;        // dir / |dir| always
92
93};
94
95#include "G4Line.icc"
96
97#endif
Note: See TracBrowser for help on using the repository browser.