Spline for rotations.
More...
#include <ignition/math/RotationSpline.hh>
|
| | RotationSpline () |
| | Constructor. Sets the autoCalc to true.
|
| |
| | ~RotationSpline () |
| | Destructor. Nothing is done.
|
| |
| void | AddPoint (const Quaterniond &_p) |
| | Adds a control point to the end of the spline.
|
| |
| void | AutoCalculate (bool _autoCalc) |
| | Tells the spline whether it should automatically calculate tangents on demand as points are added.
|
| |
| void | Clear () |
| | Clears all the points in the spline.
|
| |
| Quaterniond | Interpolate (const unsigned int _fromIndex, const double _t, const bool _useShortestPath=true) |
| | Interpolates a single segment of the spline given a parametric value.
|
| |
| Quaterniond | Interpolate (double _t, const bool _useShortestPath=true) |
| | Returns an interpolated point based on a parametric value over the whole series.
|
| |
| const Quaterniond & | Point (const unsigned int _index) const |
| | Gets the detail of one of the control points of the spline.
|
| |
| unsigned int | PointCount () const |
| | Gets the number of control points in the spline.
|
| |
| void | RecalcTangents () |
| | Recalculates the tangents associated with this spline.
|
| |
| bool | UpdatePoint (const unsigned int _index, const Quaterniond &_value) |
| | Updates a single point in the spline.
|
| |
◆ RotationSpline()
| ignition::math::IGNITION_MATH_VERSION_NAMESPACE::RotationSpline::RotationSpline |
( |
| ) |
|
Constructor. Sets the autoCalc to true.
◆ ~RotationSpline()
| ignition::math::IGNITION_MATH_VERSION_NAMESPACE::RotationSpline::~RotationSpline |
( |
| ) |
|
Destructor. Nothing is done.
◆ AddPoint()
| void ignition::math::IGNITION_MATH_VERSION_NAMESPACE::RotationSpline::AddPoint |
( |
const Quaterniond & | _p | ) |
|
Adds a control point to the end of the spline.
- Parameters
-
◆ AutoCalculate()
| void ignition::math::IGNITION_MATH_VERSION_NAMESPACE::RotationSpline::AutoCalculate |
( |
bool | _autoCalc | ) |
|
Tells the spline whether it should automatically calculate tangents on demand as points are added.
- Parameters
-
| [in] | _autoCalc | If true, tangents are calculated for you whenever a point changes. If false, you must call reclacTangents to recalculate them when it best suits. |
◆ Clear()
| void ignition::math::IGNITION_MATH_VERSION_NAMESPACE::RotationSpline::Clear |
( |
| ) |
|
Clears all the points in the spline.
◆ Interpolate() [1/2]
| Quaterniond ignition::math::IGNITION_MATH_VERSION_NAMESPACE::RotationSpline::Interpolate |
( |
const unsigned int | _fromIndex, |
|
|
const double | _t, |
|
|
const bool | _useShortestPath = true ) |
Interpolates a single segment of the spline given a parametric value.
- Parameters
-
| [in] | _fromIndex | The point index to treat as t = 0. _fromIndex + 1 is deemed to be t = 1 |
| [in] | _t | Parametric value |
| [in] | _useShortestPath | Defines if rotation should take the shortest possible path |
- Returns
- the rotation, or [INF, INF, INF, INF] on error. Use Quateriond::IsFinite() to check for an error
◆ Interpolate() [2/2]
| Quaterniond ignition::math::IGNITION_MATH_VERSION_NAMESPACE::RotationSpline::Interpolate |
( |
double | _t, |
|
|
const bool | _useShortestPath = true ) |
Returns an interpolated point based on a parametric value over the whole series.
- Parameters
-
| [in] | _t | Parametric value. |
| [in] | _useShortestPath | Defines if rotation should take the shortest possible path |
- Returns
- The rotation, or [INF, INF, INF, INF] on error. Use Quateriond::IsFinite() to check for an error
◆ Point()
| const Quaterniond & ignition::math::IGNITION_MATH_VERSION_NAMESPACE::RotationSpline::Point |
( |
const unsigned int | _index | ) |
const |
Gets the detail of one of the control points of the spline.
- Parameters
-
| [in] | _index | the index of the control point. _index is clamped to [0, PointCount()-1]. |
- Returns
- The quaternion at the specified point. If there are no points, then a Quaterniond with a value of [INF, INF, INF, INF] is returned.
◆ PointCount()
| unsigned int ignition::math::IGNITION_MATH_VERSION_NAMESPACE::RotationSpline::PointCount |
( |
| ) |
const |
Gets the number of control points in the spline.
- Returns
- the count
◆ RecalcTangents()
| void ignition::math::IGNITION_MATH_VERSION_NAMESPACE::RotationSpline::RecalcTangents |
( |
| ) |
|
Recalculates the tangents associated with this spline.
◆ UpdatePoint()
| bool ignition::math::IGNITION_MATH_VERSION_NAMESPACE::RotationSpline::UpdatePoint |
( |
const unsigned int | _index, |
|
|
const Quaterniond & | _value ) |
Updates a single point in the spline.
- Parameters
-
| [in] | _index | index |
| [in] | _value | the new control point value |
- Returns
- True on success, false if _index is larger or equal than PointCount().
The documentation for this class was generated from the following file: