FreeFOAM The Cross-Platform CFD Toolkit
splineEdge.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd.
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 Class
25  Foam::splineEdge
26 
27 Description
28  A curvedEdge interface for Catmull-Rom splines.
29 
30 Note
31  For compatibility, also accepts the type names 'polySpline' and
32  'simpleSpline'.
33 
34 SourceFiles
35  splineEdge.C
36 
37 \*---------------------------------------------------------------------------*/
38 
39 #ifndef splineEdge_H
40 #define splineEdge_H
41 
42 #include "curvedEdge.H"
43 #include "CatmullRomSpline.H"
44 
45 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 
47 namespace Foam
48 {
49 
50 /*---------------------------------------------------------------------------*\
51  Class splineEdge Declaration
52 \*---------------------------------------------------------------------------*/
53 
55 :
56  public curvedEdge,
57  public CatmullRomSpline
58 {
59  // Private Member Functions
60 
61  //- Disallow default bitwise copy construct
62  splineEdge(const splineEdge&);
63 
64  //- Disallow default bitwise assignment
65  void operator=(const splineEdge&);
66 
67 
68 public:
69 
70  //- Runtime type information
71  TypeName("spline");
72 
73 
74  // Constructors
75 
76  //- Construct from components
78  (
79  const pointField&,
80  const label start,
81  const label end,
82  const pointField& internalPoints
83  );
84 
85  //- Construct from Istream, setting pointsList
86  splineEdge(const pointField&, Istream&);
87 
88 
89  //- Destructor
90  virtual ~splineEdge();
91 
92 
93  // Member Functions
94 
95  //- Return the point position corresponding to the curve parameter
96  // 0 <= lambda <= 1
97  virtual point position(const scalar) const;
98 
99  //- Return the length of the spline curve (not implemented)
100  virtual scalar length() const;
101 };
102 
103 
104 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
105 
106 } // End namespace Foam
107 
108 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
109 
110 #endif
111 
112 // ************************ vim: set sw=4 sts=4 et: ************************ //