Spline for rotations.  
 More...
#include <math/gzmath.hh>
Public Member Functions | 
|   | RotationSpline () | 
|   | Constructor. Sets the autoCalc to true.  
  | 
|   | ~RotationSpline () | 
|   | Destructor. Nothing is done.  
  | 
| void  | AddPoint (const Quaternion &_p) | 
|   | Adds a control point to the end of the spline.  
  | 
| void  | Clear () | 
|   | Clears all the points in the spline.  
  | 
| unsigned int  | GetNumPoints () const  | 
|   | Gets the number of control points in the spline.  
  | 
| const Quaternion &  | GetPoint (unsigned int _index) const  | 
|   | Gets the detail of one of the control points of the spline.  
  | 
| Quaternion  | Interpolate (double _t, bool _useShortestPath=true) | 
|   | Returns an interpolated point based on a parametric value over the whole series.  
  | 
| Quaternion  | Interpolate (unsigned int _fromIndex, double _t, bool _useShortestPath=true) | 
|   | Interpolates a single segment of the spline given a parametric value.  
  | 
| void  | RecalcTangents () | 
|   | Recalculates the tangents associated with this spline.  
  | 
| void  | SetAutoCalculate (bool _autoCalc) | 
|   | Tells the spline whether it should automatically calculate tangents on demand as points are added.  
  | 
| void  | UpdatePoint (unsigned int _index, const Quaternion &_value) | 
|   | Updates a single point in the spline.  
  | 
Detailed Description
Constructor & Destructor Documentation
      
        
          | gazebo::math::RotationSpline::RotationSpline  | 
          ( | 
           | ) | 
           | 
        
      
 
Constructor. Sets the autoCalc to true. 
 
 
      
        
          | gazebo::math::RotationSpline::~RotationSpline  | 
          ( | 
           | ) | 
           | 
        
      
 
Destructor. Nothing is done. 
 
 
Member Function Documentation
      
        
          | void gazebo::math::RotationSpline::AddPoint  | 
          ( | 
          const Quaternion &  | 
          _p | ) | 
           | 
        
      
 
Adds a control point to the end of the spline. 
- Parameters
 - 
  
  
 
 
 
      
        
          | void gazebo::math::RotationSpline::Clear  | 
          ( | 
           | ) | 
           | 
        
      
 
Clears all the points in the spline. 
 
 
      
        
          | unsigned int gazebo::math::RotationSpline::GetNumPoints  | 
          ( | 
           | ) | 
           const | 
        
      
 
Gets the number of control points in the spline. 
- Returns
 - the count 
 
 
 
      
        
          | const Quaternion& gazebo::math::RotationSpline::GetPoint  | 
          ( | 
          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.  | 
  
   
- Returns
 - a quaternion (out of bound index result in assertion) 
 
 
 
      
        
          | Quaternion gazebo::math::RotationSpline::Interpolate  | 
          ( | 
          double  | 
          _t,  | 
        
        
           | 
           | 
          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 
 
 
 
      
        
          | Quaternion gazebo::math::RotationSpline::Interpolate  | 
          ( | 
          unsigned int  | 
          _fromIndex,  | 
        
        
           | 
           | 
          double  | 
          _t,  | 
        
        
           | 
           | 
          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 
 
 
 
      
        
          | void gazebo::math::RotationSpline::RecalcTangents  | 
          ( | 
           | ) | 
           | 
        
      
 
Recalculates the tangents associated with this spline. 
 
 
      
        
          | void gazebo::math::RotationSpline::SetAutoCalculate  | 
          ( | 
          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.  | 
  
   
 
 
      
        
          | void gazebo::math::RotationSpline::UpdatePoint  | 
          ( | 
          unsigned int  | 
          _index,  | 
        
        
           | 
           | 
          const Quaternion &  | 
          _value  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Updates a single point in the spline. 
- Parameters
 - 
  
    | [in] | _index | index  | 
    | [in] | _value | the new control point value  | 
  
   
 
 
Member Data Documentation
  
  
      
        
          | bool gazebo::math::RotationSpline::autoCalc | 
         
       
   | 
  
protected   | 
  
 
Automatic recalcultation of tangeants when control points are updated. 
 
 
  
  
      
        
          | std::vector<Quaternion> gazebo::math::RotationSpline::points | 
         
       
   | 
  
protected   | 
  
 
 
  
  
      
        
          | std::vector<Quaternion> gazebo::math::RotationSpline::tangents | 
         
       
   | 
  
protected   | 
  
 
 
The documentation for this class was generated from the following file: