Ignition Common

API Reference

4.4.0
KeyFrame.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 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 IGNITION_COMMON_KEYFRAME_HH_
18 #define IGNITION_COMMON_KEYFRAME_HH_
19 
20 #include <ignition/math/Vector3.hh>
22 
23 #include <ignition/utils/ImplPtr.hh>
24 
25 #include <ignition/common/graphics/Export.hh>
26 
27 
28 namespace ignition
29 {
30  namespace common
31  {
34  class IGNITION_COMMON_GRAPHICS_VISIBLE KeyFrame
35  {
38  public: explicit KeyFrame(const double _time);
39 
41  public: virtual ~KeyFrame();
42 
45  public: double Time() const;
46 
48  IGN_UTILS_IMPL_PTR(dataPtr)
49  };
50 
52  class IGNITION_COMMON_GRAPHICS_VISIBLE PoseKeyFrame : public KeyFrame
53  {
56  public: explicit PoseKeyFrame(const double _time);
57 
59  public: virtual ~PoseKeyFrame();
60 
63  public: void Translation(const math::Vector3d &_trans);
64 
67  public: const math::Vector3d &Translation() const;
68 
71  public: void Rotation(const math::Quaterniond &_rot);
72 
75  public: const math::Quaterniond &Rotation() const;
76 
78  IGN_UTILS_IMPL_PTR(dataPtr)
79  };
80 
82  class IGNITION_COMMON_GRAPHICS_VISIBLE NumericKeyFrame : public KeyFrame
83  {
86  public: explicit NumericKeyFrame(const double _time);
87 
89  public: virtual ~NumericKeyFrame();
90 
93  public: void Value(const double &_value);
94 
97  public: const double &Value() const;
98 
100  IGN_UTILS_IMPL_PTR(dataPtr)
101  };
102  }
103 }
104 #endif
A Time class, can be used to hold wall- or sim-time. stored as sec and nano-sec.
Definition: Time.hh:33
A key frame in an animation.
Definition: KeyFrame.hh:34
A keyframe for a NumericAnimation.
Definition: KeyFrame.hh:82
Forward declarations for the common classes.
A keyframe for a PoseAnimation.
Definition: KeyFrame.hh:52