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

Class which implements the state changing of traffic lights. More...

#include <TrafficLightGroup.h>

+ Inheritance diagram for ATrafficLightGroup:
+ Collaboration diagram for ATrafficLightGroup:

Public Member Functions

void AddController (UTrafficLightController *Controller)
 
 ATrafficLightGroup ()
 
TArray< UTrafficLightController * > & GetControllers ()
 
int GetJunctionId () const
 
bool IsFrozen () const
 
void ResetGroup ()
 
void SetFrozenGroup (bool InFreeze)
 

Protected Member Functions

virtual void Tick (float DeltaTime) override
 

Private Member Functions

void NextController ()
 

Private Attributes

friend ATrafficLightManager
 
bool bIsFrozen = false
 
TArray< UTrafficLightController * > Controllers
 
int CurrentController = 0
 
int JunctionId = -1
 
USceneComponent * SceneComponent
 

Detailed Description

Class which implements the state changing of traffic lights.

Definition at line 20 of file TrafficLightGroup.h.

Constructor & Destructor Documentation

◆ ATrafficLightGroup()

ATrafficLightGroup::ATrafficLightGroup ( )

Definition at line 13 of file TrafficLightGroup.cpp.

References SceneComponent.

Member Function Documentation

◆ AddController()

void ATrafficLightGroup::AddController ( UTrafficLightController Controller)

Definition at line 86 of file TrafficLightGroup.cpp.

References Controllers, and UTrafficLightController::SetGroup().

+ Here is the call graph for this function:

◆ GetControllers()

TArray<UTrafficLightController*>& ATrafficLightGroup::GetControllers ( )
inline

Definition at line 29 of file TrafficLightGroup.h.

Referenced by ATrafficLightBase::GetGroupTrafficLights().

+ Here is the caller graph for this function:

◆ GetJunctionId()

int ATrafficLightGroup::GetJunctionId ( ) const

Definition at line 81 of file TrafficLightGroup.cpp.

References JunctionId.

◆ IsFrozen()

bool ATrafficLightGroup::IsFrozen ( ) const

Definition at line 26 of file TrafficLightGroup.cpp.

References bIsFrozen.

Referenced by FFrameData::AddTrafficLightState(), ACarlaRecorder::AddTrafficLightState(), FWorldObserver_GetActorState(), and FWorldObserver_GetDormantActorState().

+ Here is the caller graph for this function:

◆ NextController()

void ATrafficLightGroup::NextController ( )
private

Definition at line 74 of file TrafficLightGroup.cpp.

References Controllers, CurrentController, and UTrafficLightController::StartCycle().

Referenced by Tick().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ResetGroup()

void ATrafficLightGroup::ResetGroup ( )

Definition at line 31 of file TrafficLightGroup.cpp.

References Controllers, CurrentController, and UTrafficLightController::StartCycle().

+ Here is the call graph for this function:

◆ SetFrozenGroup()

void ATrafficLightGroup::SetFrozenGroup ( bool  InFreeze)

Definition at line 21 of file TrafficLightGroup.cpp.

References bIsFrozen.

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

+ Here is the caller graph for this function:

◆ Tick()

void ATrafficLightGroup::Tick ( float  DeltaTime)
overrideprotectedvirtual

Definition at line 43 of file TrafficLightGroup.cpp.

References UTrafficLightController::AdvanceTimeAndCycleFinished(), bIsFrozen, Controllers, CurrentController, UCarlaStatics::GetCurrentEpisode(), and NextController().

+ Here is the call graph for this function:

Member Data Documentation

◆ ATrafficLightManager

friend ATrafficLightGroup::ATrafficLightManager
private

Definition at line 55 of file TrafficLightGroup.h.

◆ bIsFrozen

bool ATrafficLightGroup::bIsFrozen = false
private

Definition at line 70 of file TrafficLightGroup.h.

Referenced by IsFrozen(), SetFrozenGroup(), and Tick().

◆ Controllers

TArray<UTrafficLightController*> ATrafficLightGroup::Controllers
private

Definition at line 61 of file TrafficLightGroup.h.

Referenced by AddController(), NextController(), ResetGroup(), and Tick().

◆ CurrentController

int ATrafficLightGroup::CurrentController = 0
private

Definition at line 64 of file TrafficLightGroup.h.

Referenced by NextController(), ResetGroup(), and Tick().

◆ JunctionId

int ATrafficLightGroup::JunctionId = -1
private

◆ SceneComponent

USceneComponent* ATrafficLightGroup::SceneComponent
private

Definition at line 58 of file TrafficLightGroup.h.

Referenced by ATrafficLightGroup().


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