|
CARLA
|
#include <LightManager.h>
Inheritance diagram for carla::client::LightManager:Public Member Functions | |
| std::vector< Light > | GetAllLights (LightGroup type=LightGroup::None) const |
| Color | GetColor (LightId id) const |
| std::vector< Color > | GetColor (std::vector< Light > &lights) const |
| float | GetIntensity (LightId id) const |
| std::vector< float > | GetIntensity (std::vector< Light > &lights) const |
| LightGroup | GetLightGroup (LightId id) const |
| std::vector< LightGroup > | GetLightGroup (std::vector< Light > &lights) const |
| LightState | GetLightState (LightId id) const |
| std::vector< LightState > | GetLightState (std::vector< Light > &lights) const |
| std::vector< Light > | GetTurnedOffLights (LightGroup type=LightGroup::None) const |
| std::vector< Light > | GetTurnedOnLights (LightGroup type=LightGroup::None) const |
| bool | IsActive (LightId id) const |
| std::vector< bool > | IsActive (std::vector< Light > &lights) const |
| LightManager () | |
| LightManager (const LightManager &other) | |
| void | SetActive (LightId id, bool active) |
| void | SetActive (std::vector< Light > &lights, std::vector< bool > &active) |
| void | SetColor (LightId id, Color color) |
| void | SetColor (std::vector< Light > &lights, Color color) |
| void | SetColor (std::vector< Light > &lights, std::vector< Color > &colors) |
| void | SetDayNightCycle (const bool active) |
| void | SetEpisode (detail::WeakEpisodeProxy episode) |
| void | SetIntensity (LightId id, float intensity) |
| void | SetIntensity (std::vector< Light > &lights, float intensity) |
| void | SetIntensity (std::vector< Light > &lights, std::vector< float > &intensities) |
| void | SetLightGroup (LightId id, LightGroup group) |
| void | SetLightGroup (std::vector< Light > &lights, LightGroup group) |
| void | SetLightGroup (std::vector< Light > &lights, std::vector< LightGroup > &groups) |
| void | SetLightState (LightId id, const LightState &new_state) |
| void | SetLightState (std::vector< Light > &lights, LightState state) |
| void | SetLightState (std::vector< Light > &lights, std::vector< LightState > &states) |
| void | SetLightStateNoLock (LightId id, const LightState &new_state) |
| void | TurnOff (std::vector< Light > &lights) |
| void | TurnOn (std::vector< Light > &lights) |
| ~LightManager () | |
Private Types | |
| using | LightGroup = rpc::LightState::LightGroup |
Private Member Functions | |
| void | ApplyChanges () |
| void | QueryLightsStateToServer () |
| const LightState & | RetrieveLightState (LightId id) const |
| void | UpdateServerLightsState (bool discard_client=false) |
Private Attributes | |
| bool | _dirty = false |
| detail::WeakEpisodeProxy | _episode |
| std::unordered_map< LightId, Light > | _lights |
| std::unordered_map< LightId, LightState > | _lights_changes |
| std::unordered_map< LightId, LightState > | _lights_state |
| std::mutex | _mutex |
| size_t | _on_light_update_register_id = 0 |
| size_t | _on_tick_register_id = 0 |
| LightState | _state |
Definition at line 25 of file LightManager.h.
|
private |
Definition at line 28 of file LightManager.h.
|
inline |
Definition at line 32 of file LightManager.h.
| carla::client::LightManager::~LightManager | ( | ) |
Definition at line 17 of file LightManager.cpp.
References _episode, _on_light_update_register_id, _on_tick_register_id, carla::log_error(), and UpdateServerLightsState().
|
inline |
Definition at line 36 of file LightManager.h.
References _dirty, _episode, _lights, _lights_changes, _lights_state, _on_light_update_register_id, and _on_tick_register_id.
|
private |
Definition at line 337 of file LightManager.cpp.
References _lights_changes, _mutex, and SetLightStateNoLock().
Referenced by SetEpisode().
| std::vector< Light > carla::client::LightManager::GetAllLights | ( | LightGroup | type = LightGroup::None | ) | const |
Definition at line 53 of file LightManager.cpp.
References _lights, and _lights_state.
Definition at line 208 of file LightManager.cpp.
References carla::client::LightState::_color, and RetrieveLightState().
| float carla::client::LightManager::GetIntensity | ( | LightId | id | ) | const |
Definition at line 212 of file LightManager.cpp.
References carla::client::LightState::_intensity, and RetrieveLightState().
| std::vector< float > carla::client::LightManager::GetIntensity | ( | std::vector< Light > & | lights | ) | const |
Definition at line 158 of file LightManager.cpp.
References GetIntensity().
Referenced by GetIntensity().
| LightGroup carla::client::LightManager::GetLightGroup | ( | LightId | id | ) | const |
Definition at line 220 of file LightManager.cpp.
References carla::client::LightState::_group, and RetrieveLightState().
| std::vector< LightGroup > carla::client::LightManager::GetLightGroup | ( | std::vector< Light > & | lights | ) | const |
Definition at line 179 of file LightManager.cpp.
References GetLightGroup().
Referenced by GetLightGroup().
| LightState carla::client::LightManager::GetLightState | ( | LightId | id | ) | const |
Definition at line 216 of file LightManager.cpp.
References RetrieveLightState().
| std::vector< LightState > carla::client::LightManager::GetLightState | ( | std::vector< Light > & | lights | ) | const |
Definition at line 200 of file LightManager.cpp.
References RetrieveLightState().
| std::vector< Light > carla::client::LightManager::GetTurnedOffLights | ( | LightGroup | type = LightGroup::None | ) | const |
Definition at line 109 of file LightManager.cpp.
References carla::client::LightState::_active, carla::client::LightState::_group, _lights, and _lights_state.
| std::vector< Light > carla::client::LightManager::GetTurnedOnLights | ( | LightGroup | type = LightGroup::None | ) | const |
Definition at line 94 of file LightManager.cpp.
References carla::client::LightState::_active, carla::client::LightState::_group, _lights, and _lights_state.
| bool carla::client::LightManager::IsActive | ( | LightId | id | ) | const |
Definition at line 224 of file LightManager.cpp.
References carla::client::LightState::_active, and RetrieveLightState().
| std::vector< bool > carla::client::LightManager::IsActive | ( | std::vector< Light > & | lights | ) | const |
|
private |
Definition at line 283 of file LightManager.cpp.
References _episode, _lights, _lights_state, and _mutex.
Referenced by SetEpisode().
|
private |
Definition at line 274 of file LightManager.cpp.
References _lights_state, _state, and carla::log_warning().
Referenced by GetColor(), GetIntensity(), GetLightGroup(), GetLightState(), GetLightState(), IsActive(), SetActive(), SetColor(), SetIntensity(), SetLightGroup(), SetLightState(), and SetLightStateNoLock().
| void carla::client::LightManager::SetActive | ( | LightId | id, |
| bool | active | ||
| ) |
Definition at line 228 of file LightManager.cpp.
References carla::client::LightState::_active, _dirty, _lights_changes, _mutex, and RetrieveLightState().
| void carla::client::LightManager::SetActive | ( | std::vector< Light > & | lights, |
| std::vector< bool > & | active | ||
| ) |
Definition at line 79 of file LightManager.cpp.
References SetActive().
Referenced by SetActive(), TurnOff(), and TurnOn().
Definition at line 236 of file LightManager.cpp.
References carla::client::LightState::_color, _dirty, _lights_changes, _mutex, and RetrieveLightState().
Definition at line 124 of file LightManager.cpp.
References SetColor().
Referenced by SetColor(), and SetColor().
| void carla::client::LightManager::SetColor | ( | std::vector< Light > & | lights, |
| std::vector< Color > & | colors | ||
| ) |
Definition at line 130 of file LightManager.cpp.
References SetColor().
| void carla::client::LightManager::SetDayNightCycle | ( | const bool | active | ) |
Definition at line 344 of file LightManager.cpp.
References _episode.
| void carla::client::LightManager::SetEpisode | ( | detail::WeakEpisodeProxy | episode | ) |
Definition at line 35 of file LightManager.cpp.
References _episode, _on_light_update_register_id, _on_tick_register_id, ApplyChanges(), QueryLightsStateToServer(), and UpdateServerLightsState().
| void carla::client::LightManager::SetIntensity | ( | LightId | id, |
| float | intensity | ||
| ) |
Definition at line 244 of file LightManager.cpp.
References _dirty, carla::client::LightState::_intensity, _lights_changes, _mutex, intensity, and RetrieveLightState().
| void carla::client::LightManager::SetIntensity | ( | std::vector< Light > & | lights, |
| float | intensity | ||
| ) |
Definition at line 145 of file LightManager.cpp.
References intensity, and SetIntensity().
Referenced by SetIntensity(), and SetIntensity().
| void carla::client::LightManager::SetIntensity | ( | std::vector< Light > & | lights, |
| std::vector< float > & | intensities | ||
| ) |
Definition at line 151 of file LightManager.cpp.
References SetIntensity().
| void carla::client::LightManager::SetLightGroup | ( | LightId | id, |
| LightGroup | group | ||
| ) |
Definition at line 266 of file LightManager.cpp.
References _dirty, carla::client::LightState::_group, _lights_changes, _mutex, and RetrieveLightState().
| void carla::client::LightManager::SetLightGroup | ( | std::vector< Light > & | lights, |
| LightGroup | group | ||
| ) |
Definition at line 166 of file LightManager.cpp.
References SetLightGroup().
Referenced by SetLightGroup(), and SetLightGroup().
| void carla::client::LightManager::SetLightGroup | ( | std::vector< Light > & | lights, |
| std::vector< LightGroup > & | groups | ||
| ) |
Definition at line 172 of file LightManager.cpp.
References SetLightGroup().
| void carla::client::LightManager::SetLightState | ( | LightId | id, |
| const LightState & | new_state | ||
| ) |
Definition at line 252 of file LightManager.cpp.
References _dirty, _lights_changes, _mutex, and RetrieveLightState().
| void carla::client::LightManager::SetLightState | ( | std::vector< Light > & | lights, |
| LightState | state | ||
| ) |
Definition at line 187 of file LightManager.cpp.
References SetLightState().
Referenced by SetLightState(), and SetLightState().
| void carla::client::LightManager::SetLightState | ( | std::vector< Light > & | lights, |
| std::vector< LightState > & | states | ||
| ) |
Definition at line 193 of file LightManager.cpp.
References SetLightState().
| void carla::client::LightManager::SetLightStateNoLock | ( | LightId | id, |
| const LightState & | new_state | ||
| ) |
Definition at line 260 of file LightManager.cpp.
References _lights_changes, and RetrieveLightState().
Referenced by ApplyChanges().
| void carla::client::LightManager::TurnOff | ( | std::vector< Light > & | lights | ) |
Definition at line 73 of file LightManager.cpp.
References SetActive().
| void carla::client::LightManager::TurnOn | ( | std::vector< Light > & | lights | ) |
Definition at line 67 of file LightManager.cpp.
References SetActive().
|
private |
Definition at line 310 of file LightManager.cpp.
References _dirty, _episode, carla::rpc::LightState::_id, _lights, _lights_changes, and _mutex.
Referenced by SetEpisode(), and ~LightManager().
|
private |
Definition at line 109 of file LightManager.h.
Referenced by LightManager(), SetActive(), SetColor(), SetIntensity(), SetLightGroup(), SetLightState(), and UpdateServerLightsState().
|
private |
Definition at line 102 of file LightManager.h.
Referenced by LightManager(), QueryLightsStateToServer(), SetDayNightCycle(), SetEpisode(), UpdateServerLightsState(), and ~LightManager().
Definition at line 100 of file LightManager.h.
Referenced by GetAllLights(), GetTurnedOffLights(), GetTurnedOnLights(), LightManager(), QueryLightsStateToServer(), and UpdateServerLightsState().
|
private |
Definition at line 99 of file LightManager.h.
Referenced by ApplyChanges(), LightManager(), SetActive(), SetColor(), SetIntensity(), SetLightGroup(), SetLightState(), SetLightStateNoLock(), and UpdateServerLightsState().
|
private |
Definition at line 98 of file LightManager.h.
Referenced by GetAllLights(), GetTurnedOffLights(), GetTurnedOnLights(), LightManager(), QueryLightsStateToServer(), and RetrieveLightState().
|
private |
Definition at line 104 of file LightManager.h.
Referenced by ApplyChanges(), QueryLightsStateToServer(), SetActive(), SetColor(), SetIntensity(), SetLightGroup(), SetLightState(), and UpdateServerLightsState().
|
private |
Definition at line 108 of file LightManager.h.
Referenced by LightManager(), SetEpisode(), and ~LightManager().
|
private |
Definition at line 107 of file LightManager.h.
Referenced by LightManager(), SetEpisode(), and ~LightManager().
|
private |
Definition at line 106 of file LightManager.h.
Referenced by RetrieveLightState().