All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
KeyFrame.hh
Go to the documentation of this file.
1 /*
2  * Copyright 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 _KEYFRAME_HH_
18 #define _KEYFRAME_HH_
19 
20 #include "gazebo/math/Vector3.hh"
22 
23 namespace gazebo
24 {
25  namespace common
26  {
29 
32  class KeyFrame
33  {
36  public: KeyFrame(double _time);
37 
39  public: virtual ~KeyFrame();
40 
43  public: double GetTime() const;
44 
46  protected: double time;
47  };
48 
50  class PoseKeyFrame : public KeyFrame
51  {
54  public: PoseKeyFrame(double _time);
55 
57  public: virtual ~PoseKeyFrame();
58 
61  public: void SetTranslation(const math::Vector3 &_trans);
62 
65  public: const math::Vector3 &GetTranslation() const;
66 
69  public: void SetRotation(const math::Quaternion &_rot);
70 
73  public: const math::Quaternion &GetRotation() const;
74 
77 
80  };
81 
83  class NumericKeyFrame : public KeyFrame
84  {
87  public: NumericKeyFrame(double _time);
88 
90  public: virtual ~NumericKeyFrame();
91 
94  public: void SetValue(const double &_value);
95 
98  public: const double &GetValue() const;
99 
101  protected: double value;
102  };
104  }
105 }
106 #endif