CubicFunction.h 1.71 KB
 stonneau committed Jun 19, 2013 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 ``````/** * \file ExactCubic.h * \brief Definition of a cubic spline. * \author Steve T. * \version 0.1 * \date 06/17/2013 * * This file contains definitions for the CubicFunction class. * It allows the creation and evaluation of natural 3D * smooth cubic splines */ #ifndef _CLASS_CUBICFUNCTIONIMP #define _CLASS_CUBICFUNCTIONIMP #include "Exports.h" #include "MathDefs.h" `````` stonneau committed Jun 27, 2013 19 ``````#include "Curve_ABC.h" `````` stonneau committed Jun 19, 2013 20 21 22 23 24 25 26 27 28 29 `````` namespace spline { class SplineVisitor; /// \class CubicFunction /// \brief Represents a cubic spline defined on the interval /// [tBegin, tEnd]. It follows the equation /// x(t) = a + b(t - tBegin) + c(t - tBegin)^2 + d(t - tBegin)^3 /// `````` stonneau committed Jun 27, 2013 30 `````` class CubicFunction : public Curve_ABC `````` stonneau committed Jun 19, 2013 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 `````` { /* Constructors - destructors */ public: ///\brief Constructor SPLINE_API CubicFunction(const Vector3& /*a*/, const Vector3& /*b*/, const Vector3& /*c*/, const Vector3& /*d*/, const Real /*tBegin*/, const Real /*tEnd*/); ///\brief Destructor SPLINE_API ~CubicFunction(); private: CubicFunction(const CubicFunction&); CubicFunction& operator=(const CubicFunction&); /* Constructors - destructors */ /*Operations*/ public: /// \brief Evaluation of the cubic spline at time t. /// \param t : the time when to evaluate the spine /// \param result : a reference to the Point set to the x(t) `````` stonneau committed Jun 27, 2013 50 `````` SPLINE_API virtual bool Evaluate(const Real /*t*/, Vector3& /*result*/) const; `````` stonneau committed Jun 19, 2013 51 ``````/*Operations*/ `````` stonneau committed Jun 27, 2013 52 `````` `````` stonneau committed Jun 19, 2013 53 54 ``````/*Helpers*/ public: `````` stonneau committed Jun 27, 2013 55 56 `````` SPLINE_API Real virtual MinBound() const; SPLINE_API Real virtual MaxBound() const; `````` stonneau committed Jun 19, 2013 57 58 59 60 61 62 63 64 65 ``````/*Helpers*/ /*Attributes*/ private: const Vector3 a_, b_, c_ ,d_; const Real tBegin_, tEnd_; /*Attributes*/ }; //class CubicFunction } `````` stonneau committed Jun 27, 2013 66 67 ``````#endif //_CLASS_CUBICFUNCTIONIMP ``````