Gazebo Common
API Reference
6.0.1
insert_drive_file
Tutorials
library_books
Classes
toc
Namespaces
insert_drive_file
Files
launch
Gazebo Website
Index
List
Hierarchy
Members: All
Members: Functions
Members: Variables
Members: Typedefs
Members: Enumerations
Members: Enumerator
List
Members
Functions
Typedefs
Variables
Enumerations
Enumerator
src
gz-common
graphics
include
gz
common
SkeletonAnimation.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_SKELETONANIMATION_HH_
18
#define GZ_COMMON_SKELETONANIMATION_HH_
19
20
#include <map>
21
#include <utility>
22
#include <string>
23
24
#include <
gz/math/Matrix4.hh
>
25
#include <
gz/math/Pose3.hh
>
26
27
#include <gz/utils/ImplPtr.hh>
28
29
#include <
gz/common/NodeAnimation.hh
>
30
#include <gz/common/graphics/Export.hh>
31
32
namespace
gz
33
{
34
namespace
common
35
{
39
class
GZ_COMMON_GRAPHICS_VISIBLE
SkeletonAnimation
40
{
43
public
:
explicit
SkeletonAnimation
(
const
std::string
&_name);
44
47
public
:
~SkeletonAnimation
();
48
51
public
:
void
SetName
(
const
std::string
& _name);
52
55
public
:
std::string
Name
()
const
;
56
59
public
:
unsigned
int
NodeCount
()
const
;
60
64
public
:
NodeAnimation
*
NodeAnimationByName
(
const
std::string
&_name)
65
const
;
66
69
public
:
bool
XDisplacement
()
const
;
70
74
public
:
bool
HasNode
(
const
std::string
&_node)
const
;
75
80
public
:
void
AddKeyFrame
(
const
std::string
&_node,
const
double
_time,
81
const
math::Matrix4d
&_mat);
82
87
public
:
void
AddKeyFrame
(
const
std::string
&_node,
const
double
_time,
88
const
math::Pose3d
&_pose);
89
99
public
:
math::Matrix4d
NodePoseAt
(
const
std::string
&_node,
100
const
double
_time,
const
bool
_loop =
true
)
const
;
101
110
public
:
std::map<std::string, math::Matrix4d>
PoseAt
(
111
const
double
_time,
const
bool
_loop =
true
)
const
;
112
121
public
:
std::map<std::string, math::Matrix4d>
PoseAtX
(
const
double
_x,
122
const
std::string
&_node,
const
bool
_loop =
true
)
const
;
123
126
public
:
void
Scale
(
const
double
_scale);
127
130
public
:
double
Length
()
const
;
131
133
GZ_UTILS_IMPL_PTR(dataPtr)
134
};
135
}
136
}
137
#endif