Mechanics of Defect Evolution Library
Loading...
Searching...
No Matches
CatmullRomSplineSegment.h
Go to the documentation of this file.
1/* This file is part of MoDELib, the Mechanics Of Defects Evolution Library.
2 *
3 *
4 * MoDELib is distributed without any warranty under the
5 * GNU General Public License (GPL) v2 <http://www.gnu.org/licenses/>.
6 */
7
8#ifndef model_CatmullRomSplineSegment_H_
9#define model_CatmullRomSplineSegment_H_
10
11#include <Eigen/Dense>
12
13#include <ParametricCurve.h>
14
15namespace model
16{
17 template <int dim> class CatmullRomSplineSegment : public ParametricCurve<CatmullRomSplineSegment<dim>, dim>
18 {
19 typedef Eigen::Matrix<double, dim, 1> VectorDim;
20 typedef Eigen::Matrix<double, dim, 4> PointMatrixType;
21
22 const PointMatrixType P;
23 const Eigen::Matrix<double, 4, 4> M;
24 const PointMatrixType PM;
25
26 static Eigen::Matrix<double, 4, 4> get_M(const VectorDim &P0, const VectorDim &P1, const VectorDim &P2,
27 const VectorDim &P3);
28
29 public:
30 CatmullRomSplineSegment(const VectorDim &P0, const VectorDim &P1, const VectorDim &P2, const VectorDim &P3);
31
32 VectorDim get_r(const double &u) const;
33
34 VectorDim get_ru(const double &u) const;
35
36 VectorDim get_ruu(const double &u) const;
37 };
38
39} // namespace model
40#endif
VectorDim get_ru(const double &u) const
CatmullRomSplineSegment(const VectorDim &P0, const VectorDim &P1, const VectorDim &P2, const VectorDim &P3)
VectorDim get_r(const double &u) const
VectorDim get_ruu(const double &u) const
Class template that computes tangent, curvature and torsion of a parametric curve in arbitrary dimen...
REAL u[4]