CARLA
LibCarla
source
carla
client
client/LightState.h
Go to the documentation of this file.
1
// Copyright (c) 2020 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/sensor/data/Color.h
"
10
#include "
carla/rpc/LightState.h
"
11
12
namespace
carla
{
13
namespace
client {
14
15
using
Color
=
sensor::data::Color
;
16
using
LightId
= uint32_t;
17
18
struct
LightState
{
19
20
using
LightGroup
=
rpc::LightState::LightGroup
;
21
22
LightState
() {}
23
24
LightState
(
25
float
intensity,
26
Color
color,
27
LightGroup
group,
28
bool
active)
29
:
_intensity
(intensity),
30
_color
(color),
31
_group
(group),
32
_active
(active){}
33
34
void
Reset
() {
35
_intensity
= 0.0f;
36
_color
.
r
= 0;
37
_color
.
g
= 0;
38
_color
.
b
= 0;
39
_group
=
LightGroup::None
;
40
_active
=
false
;
41
}
42
43
float
_intensity
= 0.0f;
44
Color
_color
;
45
LightGroup
_group
=
LightGroup::None
;
46
bool
_active
=
false
;
47
};
48
49
}
// namespace client
50
}
// namespace carla
carla::sensor::data::Color::b
uint8_t b
Definition:
sensor/data/Color.h:44
carla::client::Color
sensor::data::Color Color
Definition:
client/LightState.h:15
carla::client::LightState::_intensity
float _intensity
Definition:
client/LightState.h:43
carla::sensor::data::Color::r
uint8_t r
Definition:
sensor/data/Color.h:46
carla::sensor::data::Color
A 32-bit BGRA color.
Definition:
sensor/data/Color.h:20
carla
This file contains definitions of common data structures used in traffic manager. ...
Definition:
Carla.cpp:133
carla::client::LightState
Definition:
client/LightState.h:18
carla::client::LightState::_color
Color _color
Definition:
client/LightState.h:44
carla::client::LightState::_group
LightGroup _group
Definition:
client/LightState.h:45
carla::client::LightState::_active
bool _active
Definition:
client/LightState.h:46
carla::rpc::LightState::LightGroup
LightGroup
Definition:
rpc/LightState.h:23
carla::client::LightState::Reset
void Reset()
Definition:
client/LightState.h:34
carla::client::LightId
uint32_t LightId
Definition:
client/LightState.h:16
carla::client::LightState::LightState
LightState()
Definition:
client/LightState.h:22
Color.h
carla::client::LightState::LightState
LightState(float intensity, Color color, LightGroup group, bool active)
Definition:
client/LightState.h:24
carla::sensor::data::Color::g
uint8_t g
Definition:
sensor/data/Color.h:45
carla::rpc::LightState::LightGroup::None
LightState.h
Generated by
1.8.13