Gazebo Common

API Reference

4.7.0
gz/common/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 <gz/math/Vector3.hh>
21 #include <gz/math/Quaternion.hh>
22 
23 #include <ignition/utils/ImplPtr.hh>
24 
25 #include <gz/common/config.hh>
26 #include <gz/common/graphics/Export.hh>
27 
28 
29 namespace ignition
30 {
31  namespace common
32  {
35  class IGNITION_COMMON_GRAPHICS_VISIBLE KeyFrame
36  {
39  public: explicit KeyFrame(const double _time);
40 
42  public: virtual ~KeyFrame();
43 
46  public: double Time() const;
47 
49  IGN_UTILS_IMPL_PTR(dataPtr)
50  };
51 
53  class IGNITION_COMMON_GRAPHICS_VISIBLE PoseKeyFrame : public KeyFrame
54  {
57  public: explicit PoseKeyFrame(const double _time);
58 
60  public: virtual ~PoseKeyFrame();
61 
64  public: void Translation(const math::Vector3d &_trans);
65 
68  public: const math::Vector3d &Translation() const;
69 
72  public: void Rotation(const math::Quaterniond &_rot);
73 
76  public: const math::Quaterniond &Rotation() const;
77 
79  IGN_UTILS_IMPL_PTR(dataPtr)
80  };
81 
83  class IGNITION_COMMON_GRAPHICS_VISIBLE NumericKeyFrame : public KeyFrame
84  {
87  public: explicit NumericKeyFrame(const double _time);
88 
90  public: virtual ~NumericKeyFrame();
91 
94  public: void Value(const double &_value);
95 
98  public: const double &Value() const;
99 
101  IGN_UTILS_IMPL_PTR(dataPtr)
102  };
103  }
104 }
105 #endif
Forward declarations for the common classes.
A Time class, can be used to hold wall- or sim-time. stored as sec and nano-sec.
Definition: gz/common/Time.hh:34
A keyframe for a NumericAnimation.
Definition: gz/common/KeyFrame.hh:83
A keyframe for a PoseAnimation.
Definition: gz/common/KeyFrame.hh:53
A key frame in an animation.
Definition: gz/common/KeyFrame.hh:35