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 2011 Nate Koenig
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 "math/Vector3.hh"
21 #include "math/Quaternion.hh"
22 
23 namespace gazebo
24 {
25  namespace common
26  {
29 
31  class KeyFrame
32  {
35  public: KeyFrame(double _time);
36 
38  public: virtual ~KeyFrame();
39 
42  public: double GetTime() const;
43 
45  protected: double time;
46  };
47 
49  class PoseKeyFrame : public KeyFrame
50  {
53  public: PoseKeyFrame(double _time);
54 
56  public: virtual ~PoseKeyFrame();
57 
60  public: void SetTranslation(const math::Vector3 &_trans);
61 
64  public: const math::Vector3 &GetTranslation() const;
65 
68  public: void SetRotation(const math::Quaternion &_rot);
69 
72  public: const math::Quaternion &GetRotation() const;
73 
76 
79  };
80 
82  class NumericKeyFrame : public KeyFrame
83  {
86  public: NumericKeyFrame(double _time);
87 
89  public: virtual ~NumericKeyFrame();
90 
93  public: void SetValue(const double &_value);
94 
97  public: const double &GetValue() const;
98 
100  protected: double value;
101  };
103  }
104 }
105 #endif