CARLA
 
载入中...
搜索中...
未找到
Light.h
浏览该文件的文档.
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/Memory.h"
10
12#include "carla/geom/Location.h"
13#include "carla/geom/Rotation.h"
15
16namespace carla {
17namespace client {
18
19class LightManager;
20
21class Light {
22
24
25public:
26
27 Light() {}
28
29 Color GetColor() const;
30
31 LightId GetId() const {
32 return _id;
33 }
34
35 float GetIntensity() const;
36
38 return _location;
39 }
40
42
44
45 bool IsOn() const;
46
47 bool IsOff() const;
48
49 void SetColor(Color color);
50
51 void SetIntensity(float intensity);
52
53 void SetLightGroup(LightGroup group);
54
55 void SetLightState(const LightState& state);
56
57 void TurnOn();
58
59 void TurnOff();
60
61private:
62
63 friend class LightManager;
64
66 geom::Location location,
67 LightId id)
68 : _light_manager(light_manager),
69 _location (location),
70 _id (id) {}
71
74
76
77};
78
79} // namespace client
80} // namespace carla
void SetLightState(const LightState &state)
Definition Light.cpp:72
LightGroup GetLightGroup() const
Definition Light.cpp:30
Color GetColor() const
Definition Light.cpp:18
LightState GetLightState() const
Definition Light.cpp:36
geom::Location _location
Definition Light.h:73
bool IsOn() const
Definition Light.cpp:42
float GetIntensity() const
Definition Light.cpp:24
bool IsOff() const
Definition Light.cpp:48
void SetColor(Color color)
Definition Light.cpp:54
void SetIntensity(float intensity)
Definition Light.cpp:60
WeakPtr< LightManager > _light_manager
Definition Light.h:72
Light(WeakPtr< LightManager > light_manager, geom::Location location, LightId id)
Definition Light.h:65
LightId GetId() const
Definition Light.h:31
const geom::Location GetLocation() const
Definition Light.h:37
void SetLightGroup(LightGroup group)
Definition Light.cpp:66
This file contains definitions of common data structures used in traffic manager.
Definition Carla.cpp:133
boost::weak_ptr< T > WeakPtr
Definition Memory.h:23