CARLA
 
载入中...
搜索中...
未找到
LibCarla/source/carla/rpc/ActorDefinition.h
浏览该文件的文档.
1// Copyright (c) 2017 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/ActorId.h"
12#include "carla/rpc/String.h"
13
14#include <vector>
15
16namespace carla {
17namespace rpc {
18
20 public:
21
22 ActorDefinition() = default;
23
25
26 std::string id;
27
28 std::string tags;
29
30 std::vector<ActorAttribute> attributes;
31
32#ifdef LIBCARLA_INCLUDED_FROM_UE4
33
35 : uid(Definition.UId),
36 id(FromFString(Definition.Id)),
37 tags(FromFString(Definition.Tags)) {
38 attributes.reserve(Definition.Variations.Num() + Definition.Attributes.Num());
39 for (const auto &Item : Definition.Variations) {
40 attributes.push_back(Item);
41 }
42 for (const auto &Item : Definition.Attributes) {
43 attributes.push_back(Item);
44 }
45 }
46
47#endif // LIBCARLA_INCLUDED_FROM_UE4
48
50 };
51
52} // namespace rpc
53} // namespace carla
ActorDefinition(const FActorDefinition &Definition)
MSGPACK_DEFINE_ARRAY(uid, id, tags, attributes)
uint32_t ActorId
Definition ActorId.h:14
This file contains definitions of common data structures used in traffic manager.
Definition Carla.cpp:133
A definition of a Carla Actor with all the variation and attributes.
TArray< FActorVariation > Variations
Variations represent variables the user can modify to generate variations of the actor.
TArray< FActorAttribute > Attributes
Attributes represent non-modifiable properties of the actor that might help the user identifying and ...