CARLA
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 
10 #include "carla/rpc/LightState.h"
11 
12 namespace carla {
13 namespace client {
14 
16 using LightId = uint32_t;
17 
18 struct LightState {
19 
21 
23 
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;
40  _active = false;
41  }
42 
43  float _intensity = 0.0f;
46  bool _active = false;
47 };
48 
49 } // namespace client
50 } // namespace carla
sensor::data::Color Color
A 32-bit BGRA color.
This file contains definitions of common data structures used in traffic manager. ...
Definition: Carla.cpp:133
LightState(float intensity, Color color, LightGroup group, bool active)