source: trunk/source/geometry/solids/BREPS/include/G4BSplineCurve.hh@ 1350

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

tag geant4.9.4 beta 1 + modifs locales

File size: 4.3 KB
RevLine 
[831]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: G4BSplineCurve.hh,v 1.13 2006/06/29 18:38:05 gunter Exp $
[1337]28// GEANT4 tag $Name: geant4-09-04-beta-01 $
[831]29//
30// ----------------------------------------------------------------------
31// Class G4BSplineCurve
32//
33// Class description:
34//
35// Definition of a generic BSpline curve.
36
37// Authors: J.Sulkimo, P.Urban.
38// Revisions by: L.Broglia, G.Cosmo.
39// ----------------------------------------------------------------------
40#ifndef __BSPLINECURVE_H
41#define __BSPLINECURVE_H
42
43#include "G4Curve.hh"
44#include "G4Point3DVector.hh"
45
46class G4ControlPoints;
47class G4KnotVector;
48
49class G4BSplineCurve : public G4Curve
50{
51public:
52
53 typedef std::vector<G4double> G4doubleVector;
54
55public: // with description
56
57 G4BSplineCurve();
58 // Default constructor, must be followed by call to Init(...) method.
59
60 virtual ~G4BSplineCurve();
61 // Virtual destructor.
62
63 G4BSplineCurve(const G4BSplineCurve& right);
64 G4BSplineCurve& operator=(const G4BSplineCurve& right);
65 // Copy constructor and assignment operator.
66
67 virtual G4Curve* Project(const G4Transform3D& tr=
68 HepGeom::Transform3D::Identity);
69 // Transforms and projects all control points.
70
71 virtual G4double GetPMax() const;
72 virtual G4Point3D GetPoint(G4double param) const;
73 virtual G4double GetPPoint(const G4Point3D& p) const;
74 // Accessors methods.
75
76 void Init(G4int degree0, G4Point3DVector* controlPointsList0,
77 G4doubleVector* knots0, G4doubleVector* weightsData0);
78 G4int GetDegree() const;
79 const G4Point3DVector* GetControlPointsList() const;
80 const G4doubleVector* GetKnots() const;
81 const G4doubleVector* GetWeightsData() const;
82 // Get/Set methods for the geometric data.
83 // The "knots" vector contains each knot multiplicity Times.
84 // The object is responsible for deleting the containers passed
85 // to the Init method.
86
87public: // without description
88
89 virtual G4bool Tangent(G4CurvePoint& cp, G4Vector3D& v);
90 // Returns false. Empty implementation.
91
92 virtual G4int IntersectRay2D(const G4Ray& ray);
93 // Returns 0. Empty implementation.
94
95 //virtual void IntersectRay2D(const G4Ray& ray, G4CurveRayIntersection& is);
96
97protected:
98
99 virtual void InitBounded();
100
101 //public:
102 //void ProjectCurve(const G4Plane&, const G4Plane&);
103 //int Inside(const G4Point3d&, const G4Ray&);
104 //void CalcCurvePlaneNormal();
105
106protected:
107
108 // geometric data:
109 // knots - contains each knot multiplicity Times.
110 // knot_multiplicities is not needed, weightsData might be 0
111 // curve_form, closed_curve, self_intersect is not used,
112 // as they are unreliable sources of information.
113 //
114 G4int degree;
115 G4Point3DVector* controlPointsList;
116 G4doubleVector* knots;
117 G4doubleVector* weightsData;
118
119};
120
121#include "G4BSplineCurve.icc"
122
123#endif
Note: See TracBrowser for help on using the repository browser.