CARLA
LibCarla/source/carla/rpc/WalkerBoneControlIn.h
Go to the documentation of this file.
1 // Copyright (c) 2019 Computer Vision Center (CVC) at the Universitat Autonoma
2 // de Barcelona (UAB).
3 //
4 // This work is licensed under the terms of the MIT license.
5 // For a copy, see <https://opensource.org/licenses/MIT>.
6 
7 #pragma once
8 
9 #include "carla/MsgPack.h"
11 #include "carla/rpc/String.h"
12 #include "carla/rpc/Transform.h"
13 
14 #ifdef LIBCARLA_INCLUDED_FROM_UE4
18 #endif // LIBCARLA_INCLUDED_FROM_UE4
19 
20 #include <vector>
21 
22 namespace carla {
23 namespace rpc {
24 
26  public:
27 
28  WalkerBoneControlIn() = default;
29 
31  std::vector<rpc::BoneTransformDataIn> bone_transforms)
32  : bone_transforms(bone_transforms) {}
33 
34 #ifdef LIBCARLA_INCLUDED_FROM_UE4
35 
36  operator FWalkerBoneControlIn() const {
37  FWalkerBoneControlIn Control;
38  for (auto &bone_transform : bone_transforms) {
39  Control.BoneTransforms.Add(ToFString(bone_transform.first), bone_transform.second);
40  }
41  return Control;
42  }
43 
44 #endif // LIBCARLA_INCLUDED_FROM_UE4
45 
46  std::vector<rpc::BoneTransformDataIn> bone_transforms;
47 
48  MSGPACK_DEFINE_ARRAY(bone_transforms);
49  };
50 
51 } // namespace rpc
52 } // namespace carla
This file contains definitions of common data structures used in traffic manager. ...
Definition: Carla.cpp:133
std::vector< rpc::BoneTransformDataIn > bone_transforms
WalkerBoneControlIn(std::vector< rpc::BoneTransformDataIn > bone_transforms)
MSGPACK_DEFINE_ARRAY(bone_transforms)