SplineInterpolationSegment.h
Go to the documentation of this file.
1 /*
2  * This file is part of ArmarX.
3  *
4  * ArmarX is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License version 2 as
6  * published by the Free Software Foundation.
7  *
8  * ArmarX is distributed in the hope that it will be useful, but
9  * WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program. If not, see <http://www.gnu.org/licenses/>.
15  *
16  * @package ArmarXGuiPlugins::RobotTrajectoryDesigner
17  * @author Timo Birr
18  * @date 2018
19  * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
20  * GNU General Public License
21  */
22 #ifndef SPLINEINTERPOLATIONSEGMENT_H
23 #define SPLINEINTERPOLATIONSEGMENT_H
24 
25 #include "SplineInterpolation.h"
26 
27 
28 namespace armarx
29 {
30  /**
31  * @brief The SplineInterpolationSegment class represents the segment of a parent SplineInterpolation between two control points
32  */
34  {
35  public:
36  /**
37  * @brief SplineInterpolationSegment creates a new SplineInterpolation
38  * @param number the number of the control point at the beginning of the interval (from 0 to #controlPoints-2)
39  * @param parent the SplineInterpolation that the created Object is the segment of
40  */
42 
43  /**
44  * @brief getPoseAt returns the Pose defined by f(time)
45  * @param time a time between 0 and 1 with getPoseAt(0) being the startingPose and getPoseAt(1) being the ending Pose
46  * @return the pose of the interpolation-function at time
47  */
48  PoseBasePtr getPoseAt(double time) override;
49 
50  /**
51  * @brief always returns 2 as there are always 2 control points in a spline interpolation segment
52  */
54 
55  private:
56  double poseAccesFactor;
57  double poseAccesStart;
59  };
60 
61  using SplineInterpolationSegmentPtr = std::shared_ptr<SplineInterpolationSegment>;
62 }
63 
64 #endif
armarx::SplineInterpolationSegmentPtr
std::shared_ptr< SplineInterpolationSegment > SplineInterpolationSegmentPtr
Definition: SplineInterpolationSegment.h:61
armarx::SplineInterpolationSegment::getPoseAt
PoseBasePtr getPoseAt(double time) override
getPoseAt returns the Pose defined by f(time)
Definition: SplineInterpolationSegment.cpp:39
armarx::AbstractInterpolation
The AbstractInterpolation class represents a function f:t->P with P being the space of all poses The ...
Definition: AbstractInterpolation.h:36
armarx::AbstractInterpolationPtr
std::shared_ptr< AbstractInterpolation > AbstractInterpolationPtr
Definition: AbstractInterpolation.h:77
SplineInterpolation.h
armarx::SplineInterpolationSegment
The SplineInterpolationSegment class represents the segment of a parent SplineInterpolation between t...
Definition: SplineInterpolationSegment.h:33
armarx::SplineInterpolationSegment::getNumberOfControlPoints
int getNumberOfControlPoints()
always returns 2 as there are always 2 control points in a spline interpolation segment
Definition: SplineInterpolationSegment.cpp:48
armarx::SplineInterpolationSegment::SplineInterpolationSegment
SplineInterpolationSegment(int number, AbstractInterpolationPtr parent)
SplineInterpolationSegment creates a new SplineInterpolation.
Definition: SplineInterpolationSegment.cpp:28
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:28