CARLA
Public Member Functions | Private Member Functions | Private Attributes | List of all members
UCarlaLightSubsystem Class Reference

#include <CarlaLightSubsystem.h>

+ Inheritance diagram for UCarlaLightSubsystem:
+ Collaboration diagram for UCarlaLightSubsystem:

Public Member Functions

void Deinitialize () override
 
UCarlaLight * GetLight (int Id)
 
std::vector< carla::rpc::LightStateGetLights (FString Client)
 
TMap< int, UCarlaLight *> & GetLights ()
 
void Initialize (FSubsystemCollectionBase &Collection) override
 
bool IsUpdatePending () const
 
int32 NumLights () const
 
void RegisterLight (UCarlaLight *CarlaLight)
 
void SetDayNightCycle (const bool active)
 
void SetLights (FString Client, std::vector< carla::rpc::LightState > LightsToSet, bool DiscardClient=false)
 
void UnregisterLight (UCarlaLight *CarlaLight)
 

Private Member Functions

void SetClientStatesdirty (FString ClientThatUpdate)
 

Private Attributes

TMap< FString, bool > ClientStates
 
TMap< int, UCarlaLight *> Lights
 

Detailed Description

Definition at line 26 of file CarlaLightSubsystem.h.

Member Function Documentation

◆ Deinitialize()

void UCarlaLightSubsystem::Deinitialize ( )
override

Definition at line 18 of file CarlaLightSubsystem.cpp.

◆ GetLight()

UCarlaLight * UCarlaLightSubsystem::GetLight ( int  Id)

Definition at line 98 of file CarlaLightSubsystem.cpp.

References Lights.

Referenced by CarlaReplayerHelper::ProcessReplayerLightScene(), and FFrameData::ProcessReplayerLightScene().

+ Here is the caller graph for this function:

◆ GetLights() [1/2]

std::vector< carla::rpc::LightState > UCarlaLightSubsystem::GetLights ( FString  Client)

Definition at line 59 of file CarlaLightSubsystem.cpp.

References ClientStates, and Lights.

Referenced by ACarlaRecorder::AddExistingActors(), and FCarlaServer::FPimpl::BindActions().

+ Here is the caller graph for this function:

◆ GetLights() [2/2]

TMap<int, UCarlaLight* >& UCarlaLightSubsystem::GetLights ( )
inline

Definition at line 60 of file CarlaLightSubsystem.h.

◆ Initialize()

void UCarlaLightSubsystem::Initialize ( FSubsystemCollectionBase &  Collection)
override

Definition at line 13 of file CarlaLightSubsystem.cpp.

◆ IsUpdatePending()

bool UCarlaLightSubsystem::IsUpdatePending ( ) const

Definition at line 47 of file CarlaLightSubsystem.cpp.

References ClientStates.

Referenced by FCarlaEngine::OnPostTick().

+ Here is the caller graph for this function:

◆ NumLights()

int32 UCarlaLightSubsystem::NumLights ( ) const
inline

Definition at line 47 of file CarlaLightSubsystem.h.

◆ RegisterLight()

void UCarlaLightSubsystem::RegisterLight ( UCarlaLight *  CarlaLight)

Definition at line 23 of file CarlaLightSubsystem.cpp.

References Lights, and SetClientStatesdirty().

+ Here is the call graph for this function:

◆ SetClientStatesdirty()

void UCarlaLightSubsystem::SetClientStatesdirty ( FString  ClientThatUpdate)
private

Definition at line 119 of file CarlaLightSubsystem.cpp.

References ClientStates.

Referenced by RegisterLight(), and UnregisterLight().

+ Here is the caller graph for this function:

◆ SetDayNightCycle()

void UCarlaLightSubsystem::SetDayNightCycle ( const bool  active)

Definition at line 107 of file CarlaLightSubsystem.cpp.

Referenced by FCarlaServer::FPimpl::BindActions().

+ Here is the caller graph for this function:

◆ SetLights()

void UCarlaLightSubsystem::SetLights ( FString  Client,
std::vector< carla::rpc::LightState LightsToSet,
bool  DiscardClient = false 
)

Definition at line 74 of file CarlaLightSubsystem.cpp.

References ClientStates, and Lights.

Referenced by FCarlaServer::FPimpl::BindActions().

+ Here is the caller graph for this function:

◆ UnregisterLight()

void UCarlaLightSubsystem::UnregisterLight ( UCarlaLight *  CarlaLight)

Definition at line 38 of file CarlaLightSubsystem.cpp.

References Lights, and SetClientStatesdirty().

+ Here is the call graph for this function:

Member Data Documentation

◆ ClientStates

TMap<FString, bool> UCarlaLightSubsystem::ClientStates
private

Definition at line 74 of file CarlaLightSubsystem.h.

Referenced by GetLights(), IsUpdatePending(), SetClientStatesdirty(), and SetLights().

◆ Lights

TMap<int, UCarlaLight* > UCarlaLightSubsystem::Lights
private

Definition at line 71 of file CarlaLightSubsystem.h.

Referenced by GetLight(), GetLights(), RegisterLight(), SetLights(), and UnregisterLight().


The documentation for this class was generated from the following files: