RotationSpline Class Reference

Spline for rotations. More...

#include <math/gzmath.hh>

Public Member Functions

 RotationSpline () GAZEBO_DEPRECATED(8.0)
 Constructor. More...
 
 ~RotationSpline () GAZEBO_DEPRECATED(8.0)
 Destructor. More...
 
void AddPoint (const Quaternion &_p) GAZEBO_DEPRECATED(8.0)
 Adds a control point to the end of the spline. More...
 
void Clear () GAZEBO_DEPRECATED(8.0)
 Clears all the points in the spline. More...
 
unsigned int GetNumPoints () const GAZEBO_DEPRECATED(8.0)
 Gets the number of control points in the spline. More...
 
const QuaternionGetPoint (unsigned int _index) const GAZEBO_DEPRECATED(8.0)
 Gets the detail of one of the control points of the spline. More...
 
Quaternion Interpolate (double _t, bool _useShortestPath=true) GAZEBO_DEPRECATED(8.0)
 Returns an interpolated point based on a parametric value over the whole series. More...
 
Quaternion Interpolate (unsigned int _fromIndex, double _t, bool _useShortestPath=true) GAZEBO_DEPRECATED(8.0)
 Interpolates a single segment of the spline given a parametric value. More...
 
void RecalcTangents () GAZEBO_DEPRECATED(8.0)
 Recalculates the tangents associated with this spline. More...
 
void SetAutoCalculate (bool _autoCalc) GAZEBO_DEPRECATED(8.0)
 Tells the spline whether it should automatically calculate tangents on demand as points are added. More...
 
void UpdatePoint (unsigned int _index, const Quaternion &_value) GAZEBO_DEPRECATED(8.0)
 Updates a single point in the spline. More...
 

Protected Attributes

bool autoCalc
 Automatic recalcultation of tangeants when control points are updated. More...
 
std::vector< Quaternionpoints
 the control points More...
 
std::vector< Quaterniontangents
 the tangents More...
 

Detailed Description

Spline for rotations.

Constructor & Destructor Documentation

Constructor.

Sets the autoCalc to true

Deprecated:
See ignition::math::RotationSpline

Destructor.

Nothing is done

Deprecated:
See ignition::math::RotationSpline

Member Function Documentation

void AddPoint ( const Quaternion _p)

Adds a control point to the end of the spline.

Parameters
[in]_pcontrol point
Deprecated:
See ignition::math::RotationSpline
void Clear ( )

Clears all the points in the spline.

Deprecated:
See ignition::math::RotationSpline
unsigned int GetNumPoints ( ) const

Gets the number of control points in the spline.

Returns
the count
Deprecated:
See ignition::math::RotationSpline
const Quaternion& GetPoint ( unsigned int  _index) const

Gets the detail of one of the control points of the spline.

Parameters
[in]_indexthe index of the control point.
Remarks
This point must already exist in the spline.
Returns
a quaternion (out of bound index result in assertion)
Deprecated:
See ignition::math::RotationSpline
Quaternion Interpolate ( double  _t,
bool  _useShortestPath = true 
)

Returns an interpolated point based on a parametric value over the whole series.

Remarks
Given a t value between 0 and 1 representing the parametric distance along the whole length of the spline, this method returns an interpolated point.
Parameters
[in]_tParametric value.
[in]_useShortestPathDefines if rotation should take the shortest possible path
Returns
the rotation
Deprecated:
See ignition::math::RotationSpline
Quaternion Interpolate ( unsigned int  _fromIndex,
double  _t,
bool  _useShortestPath = true 
)

Interpolates a single segment of the spline given a parametric value.

Parameters
[in]_fromIndexThe point index to treat as t = 0. _fromIndex + 1 is deemed to be t = 1
[in]_tParametric value
[in]_useShortestPathDefines if rotation should take the shortest possible path
Returns
the rotation
Deprecated:
See ignition::math::RotationSpline
void RecalcTangents ( )

Recalculates the tangents associated with this spline.

Remarks
If you tell the spline not to update on demand by calling setAutoCalculate(false) then you must call this after completing your updates to the spline points.
Deprecated:
See ignition::math::RotationSpline
void SetAutoCalculate ( bool  _autoCalc)

Tells the spline whether it should automatically calculate tangents on demand as points are added.

Remarks
The spline calculates tangents at each point automatically based on the input points. Normally it does this every time a point changes. However, if you have a lot of points to add in one go, you probably don't want to incur this overhead and would prefer to defer the calculation until you are finished setting all the points. You can do this by calling this method with a parameter of 'false'. Just remember to manually call the recalcTangents method when you are done.
Parameters
[in]_autoCalcIf true, tangents are calculated for you whenever a point changes. If false, you must call reclacTangents to recalculate them when it best suits.
Deprecated:
See ignition::math::RotationSpline
void UpdatePoint ( unsigned int  _index,
const Quaternion _value 
)

Updates a single point in the spline.

Remarks
This point must already exist in the spline.
Parameters
[in]_indexindex
[in]_valuethe new control point value
Deprecated:
See ignition::math::RotationSpline

Member Data Documentation

bool autoCalc
protected

Automatic recalcultation of tangeants when control points are updated.

std::vector<Quaternion> points
protected

the control points

std::vector<Quaternion> tangents
protected

the tangents


The documentation for this class was generated from the following file: