Gazebo Common

API Reference

6.0.0~pre2
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 GZ_COMMON_KEYFRAME_HH_
18#define GZ_COMMON_KEYFRAME_HH_
19
20#include <gz/math/Vector3.hh>
21#include <gz/math/Quaternion.hh>
22
23#include <gz/utils/ImplPtr.hh>
24
25#include <gz/common/graphics/Export.hh>
26
27
28namespace gz
29{
30 namespace common
31 {
34 class GZ_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 GZ_UTILS_IMPL_PTR(dataPtr)
49 };
50
52 class GZ_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 GZ_UTILS_IMPL_PTR(dataPtr)
79 };
80
82 class GZ_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 GZ_UTILS_IMPL_PTR(dataPtr)
101 };
102 }
103}
104#endif