CARLA
 
载入中...
搜索中...
未找到
rpc/LightState.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
10#include "carla/geom/Rotation.h"
11#include "carla/rpc/Color.h"
12
13namespace carla {
14namespace rpc {
15
16using LightId = uint32_t;
17
19public:
20
21 using flag_type = uint8_t;
22
23 enum class LightGroup : flag_type {
24 None = 0,
25 Vehicle,
26 Street,
28 Other
29 };
30
32
33 #用于表示某种灯光状态相关信息
35 geom::Location location,
36 float intensity,
37 LightGroup group,
38 Color color,
39 bool active)
40 : _location(location),
41 _intensity(intensity),
42 _group(static_cast<flag_type>(group)),
43 _color(color),
44 _active(active) {}
45
46 #定义了一个名为_location的geom::Location变量
48 #定义了一个名为_intensity的float类型变量
49 float _intensity = 0.0f;
50 #定义了一个名为_id的LightId类型变量
52 #定义了一个名为_group的flag_type变量
54 #定义了一个 名为_color的Color变量
56 #定义了一个名为_active的bool类型变量
57 bool _active = false;
58
59 #使用宏来定义一个数组
61
62};
63
64} // namespace rpc
65} // namespace carla
LightState(geom::Location location, float intensity, LightGroup group, Color color, bool active)
geom::Location _location
MSGPACK_DEFINE_ARRAY(_id, _location, _intensity, _group, _color, _active)
uint32_t LightId
CARLA模拟器的主命名空间。
Definition Carla.cpp:139