46 const Vector<D> vf,
const double lower,
const double upper)
47 : m_lower{lower}, m_upper{upper}, m_unit{p0, pf, v0 * (upper - lower),
48 vf * (upper - lower)} {};
54 : m_lower{other.m_lower}, m_upper{other.m_upper}, m_unit{other.m_unit} {}
65 m_unit = other.m_unit;
66 m_lower = other.m_lower;
67 m_upper = other.m_upper;
91 const double tNew = (t - m_lower) / (m_upper - m_lower);
92 res = m_unit.getPos(tNew);
108 const double tNew = (t - m_lower) / (m_upper - m_lower);
109 res = m_unit.getVel(tNew) * (1 / (m_upper - m_lower));
125 const double tNew = (t - m_lower) / (m_upper - m_lower);
126 res = m_unit.getAcc(tNew) * (1 / (m_upper - m_lower)) *
Base class for interpolation functions.
Definition: base_interpol.hpp:23
A hermite spline on a subinterval.
Definition: hermite_sub.hpp:23
Vector< D > getPos(const double t) const override
Gets position at a certain time.
Definition: hermite_sub.hpp:89
HermiteSub()
Default constructor.
Definition: hermite_sub.hpp:31
HermiteSub(const HermiteSub< D > &other)
Copy constructor.
Definition: hermite_sub.hpp:53
HermiteSub< D > & operator=(const HermiteSub< D > &other)
Assignment operator.
Definition: hermite_sub.hpp:59
Vector< D > getVel(const double t) const override
Gets velocity at a certain time.
Definition: hermite_sub.hpp:106
~HermiteSub() override=default
Destructor.
HermiteSub(const Vector< D > p0, const Vector< D > pf, const Vector< D > v0, const Vector< D > vf, const double lower, const double upper)
Constructor.
Definition: hermite_sub.hpp:45
Vector< D > getAcc(const double t) const override
Gets acceleration of the function at a certain time.
Definition: hermite_sub.hpp:123
Interpolates on the unit interval.
Definition: hermite_unit.hpp:29
A base vector representation.
Definition: simplevectors.hpp:63