KeyFrame.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2012-2016 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 _KEYFRAME_HH_
18 #define _KEYFRAME_HH_
19 
20 #include <ignition/math/Vector3.hh>
21 #include <ignition/math/Quaternion.hh>
22 
24 #include "gazebo/math/Vector3.hh"
26 #include "gazebo/util/system.hh"
27 
28 namespace gazebo
29 {
30  namespace common
31  {
34 
37  class GZ_COMMON_VISIBLE KeyFrame
38  {
41  public: KeyFrame(double _time);
42 
44  public: virtual ~KeyFrame();
45 
48  public: double GetTime() const;
49 
51  protected: double time;
52  };
53 
55  class GZ_COMMON_VISIBLE PoseKeyFrame : public KeyFrame
56  {
59  public: PoseKeyFrame(double _time);
60 
62  public: virtual ~PoseKeyFrame();
63 
66  public: void Translation(const ignition::math::Vector3d &_trans);
67 
70  public: ignition::math::Vector3d Translation() const;
71 
74  public: void Rotation(const ignition::math::Quaterniond &_rot);
75 
78  public: ignition::math::Quaterniond Rotation() const;
79 
81  protected: ignition::math::Vector3d translate;
82 
84  protected: ignition::math::Quaterniond rotate;
85  };
86 
88  class GZ_COMMON_VISIBLE NumericKeyFrame : public KeyFrame
89  {
92  public: NumericKeyFrame(double _time);
93 
95  public: virtual ~NumericKeyFrame();
96 
99  public: void SetValue(const double &_value);
100 
103  public: const double &GetValue() const;
104 
106  protected: double value;
107  };
109  }
110 }
111 #endif
Forward declarations for the common classes.
Definition: Animation.hh:33
A keyframe for a NumericAnimation.
Definition: KeyFrame.hh:88
A keyframe for a PoseAnimation.
Definition: KeyFrame.hh:55
A key frame in an animation.
Definition: KeyFrame.hh:37
double value
numeric value
Definition: KeyFrame.hh:106
ignition::math::Quaterniond rotate
the rotation quaternion
Definition: KeyFrame.hh:84
double time
time of key frame
Definition: KeyFrame.hh:51
ignition::math::Vector3d translate
the translation vector
Definition: KeyFrame.hh:81