19#ifndef IGNITION_MATH_SPLINE_HH_
20#define IGNITION_MATH_SPLINE_HH_
24#include <ignition/math/config.hh>
30 inline namespace IGNITION_MATH_VERSION_NAMESPACE
72 const double _t)
const;
90 private:
void AddPoint(
const ControlPoint &_cp,
const bool _fixed);
113 const unsigned int _mth)
const;
146 private:
bool UpdatePoint(
const unsigned int _index,
147 const ControlPoint &_cp,
172 const double _t)
const;
195 const double _t)
const;
204 const double _1)
const;
217 const unsigned int _mth,
218 const double _s)
const;
243 private:
void Rebuild();
254 private:
bool MapToSegment(
const double _t,
255 unsigned int &_index,
256 double &_fraction)
const;
260 private: SplinePrivate *dataPtr;
Splines.
Definition Spline.hh:39
bool UpdatePoint(const unsigned int _index, const Vector3d &_p, const Vector3d &_t)
Updates a single control point in the spline, along with its tangent.
double Tension() const
Gets the tension value.
void AutoCalculate(bool _autoCalc)
Tells the spline whether it should automatically calculate tangents on demand as points are added.
double ArcLength(const double _t) const
Gets spline arc length up to a given parameter value _t.
Vector3d MthDerivative(const unsigned int _index, const unsigned int _mth) const
Gets the mth derivative for one of the control points of the spline.
Vector3d InterpolateTangent(const unsigned int _fromIndex, const double _t) const
Interpolates the tangent on a segment of the spline at parameter value _t.
void Clear()
Clears all the points in the spline.
void AddPoint(const Vector3d &_p, const Vector3d &_t)
Adds a single control point to the end of the spline with fixed tangent.
bool UpdatePoint(const unsigned int _index, const Vector3d &_p)
Updates a single control point value in the spline, keeping its tangent.
size_t PointCount() const
Gets the number of control points in the spline.
void RecalcTangents()
Recalculates the tangents associated with this spline.
Vector3d Tangent(const unsigned int _index) const
Gets the tangent value for one of the control points of the spline.
void AddPoint(const Vector3d &_p)
Adds a single control point to the end of the spline.
Vector3d InterpolateMthDerivative(const unsigned int _mth, const double _1) const
Interpolates the mth derivative of the spline at parameter value _t.
double ArcLength(const unsigned int _index, const double _t) const
Gets a spline segment arc length.
Vector3d InterpolateMthDerivative(const unsigned int _fromIndex, const unsigned int _mth, const double _s) const
Interpolates the mth derivative of a segment of the spline at parameter value _t.
void Tension(double _t)
Sets the tension parameter.
Vector3d Point(const unsigned int _index) const
Gets the value for one of the control points of the spline.
Vector3d InterpolateTangent(const double _t) const
Interpolates a tangent on the spline at parameter value _t.
Vector3d Interpolate(const double _t) const
Interpolates a point on the spline at parameter value _t.
double ArcLength() const
Gets spline arc length.
Vector3d Interpolate(const unsigned int _fromIndex, const double _t) const
Interpolates a point on a segment of the spline at parameter value _t.
The Vector3 class represents the generic vector containing 3 elements.
Definition Vector3.hh:40