Ignition Math

API Reference

6.4.0
RotationSpline.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2012 Open Source Robotics Foundation
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16 */
17 #ifndef IGNITION_MATH_ROTATIONSPLINE_HH_
18 #define IGNITION_MATH_ROTATIONSPLINE_HH_
19 
21 #include <ignition/math/config.hh>
22 
23 namespace ignition
24 {
25  namespace math
26  {
27  // Inline bracket to help doxygen filtering.
28  inline namespace IGNITION_MATH_VERSION_NAMESPACE {
29  //
30  // Forward declare private data
31  class RotationSplinePrivate;
32 
35  class IGNITION_MATH_VISIBLE RotationSpline
36  {
38  public: RotationSpline();
39 
41  public: ~RotationSpline();
42 
45  public: void AddPoint(const Quaterniond &_p);
46 
54  public: const Quaterniond &Point(const unsigned int _index) const;
55 
58  public: unsigned int PointCount() const;
59 
61  public: void Clear();
62 
69  public: bool UpdatePoint(const unsigned int _index,
70  const Quaterniond &_value);
71 
82  public: Quaterniond Interpolate(double _t,
83  const bool _useShortestPath = true);
84 
94  public: Quaterniond Interpolate(const unsigned int _fromIndex,
95  const double _t, const bool _useShortestPath = true);
96 
111  public: void AutoCalculate(bool _autoCalc);
112 
117  public: void RecalcTangents();
118 
120  private: RotationSplinePrivate *dataPtr;
121  };
122  }
123  }
124 }
125 
126 #endif
Spline for rotations.
Definition: RotationSpline.hh:35
Definition: Angle.hh:42
A quaternion class.
Definition: Matrix3.hh:35