CARLA
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Private Attributes | List of all members
ATrafficSignBase Class Reference

#include <TrafficSignBase.h>

+ Inheritance diagram for ATrafficSignBase:

Public Member Functions

 ATrafficSignBase (const FObjectInitializer &ObjectInitializer)
 
int32 GetSpeedLimitKmh () const
 km/h this sign limits to, -1 when it is not a speed-limit sign.
 
ETrafficSignState GetTrafficSignState () const
 
UBoxComponent * GetTriggerVolume () const
 
TArray< UBoxComponent * > GetTriggerVolumes () const
 
void SetSpeedLimitKmh (int32 Kmh)
 Make this a speed-limit sign for Kmh: picks the dedicated state when one exists, the custom state (value kept in SpeedLimitKmh) otherwise.
 
void SetTrafficSignState (ETrafficSignState State)
 

Public Attributes

bool bGeneratedFromOpenDRIVE = false
 True for signs/lights generated from the OpenDRIVE map.
 
bool bPositioned = false
 True once this sign has been snapped to the ground, to avoid adjusting it more than once.
 

Private Attributes

int32 SpeedLimitKmh = 0
 Limit in km/h for the custom SpeedLimit state (ignored for the dedicated states).
 
ETrafficSignState TrafficSignState = ETrafficSignState::UNKNOWN
 

Detailed Description

Definition at line 105 of file TrafficSignBase.h.

Constructor & Destructor Documentation

◆ ATrafficSignBase()

ATrafficSignBase::ATrafficSignBase ( const FObjectInitializer &  ObjectInitializer)

Definition at line 11 of file TrafficSignBase.cpp.

Member Function Documentation

◆ GetSpeedLimitKmh()

int32 ATrafficSignBase::GetSpeedLimitKmh ( ) const
inline

km/h this sign limits to, -1 when it is not a speed-limit sign.

Dedicated states answer from the enum; the custom SpeedLimit state answers from SpeedLimitKmh.

Definition at line 128 of file TrafficSignBase.h.

References KmhForSpeedLimitState().

Referenced by MatchSignalAndActor(), and UCarlaEpisode_GetTrafficSignId().

◆ GetTrafficSignState()

ETrafficSignState ATrafficSignBase::GetTrafficSignState ( ) const
inline

◆ GetTriggerVolume()

UBoxComponent * ATrafficSignBase::GetTriggerVolume ( ) const

Referenced by GetTriggerVolumes().

◆ GetTriggerVolumes()

TArray< UBoxComponent * > ATrafficSignBase::GetTriggerVolumes ( ) const

◆ SetSpeedLimitKmh()

void ATrafficSignBase::SetSpeedLimitKmh ( int32  Kmh)
inline

Make this a speed-limit sign for Kmh: picks the dedicated state when one exists, the custom state (value kept in SpeedLimitKmh) otherwise.

Definition at line 140 of file TrafficSignBase.h.

References SpeedLimitStateForKmh().

Referenced by AGeoTrafficSign::ConfigureForSignal().

◆ SetTrafficSignState()

void ATrafficSignBase::SetTrafficSignState ( ETrafficSignState  State)
inline

Member Data Documentation

◆ bGeneratedFromOpenDRIVE

bool ATrafficSignBase::bGeneratedFromOpenDRIVE = false

True for signs/lights generated from the OpenDRIVE map.

Height adjustment only moves generated actors, never signs placed by hand in the level.

Definition at line 159 of file TrafficSignBase.h.

Referenced by TrafficSignHeightUtils::AdjustSignToGround(), ATrafficLightManager::SpawnSignals(), and ATrafficLightManager::SpawnTrafficLights().

◆ bPositioned

bool ATrafficSignBase::bPositioned = false

True once this sign has been snapped to the ground, to avoid adjusting it more than once.

Definition at line 154 of file TrafficSignBase.h.

Referenced by TrafficSignHeightUtils::AdjustSignToGround().

◆ SpeedLimitKmh

int32 ATrafficSignBase::SpeedLimitKmh = 0
private

Limit in km/h for the custom SpeedLimit state (ignored for the dedicated states).

Definition at line 168 of file TrafficSignBase.h.

◆ TrafficSignState

ETrafficSignState ATrafficSignBase::TrafficSignState = ETrafficSignState::UNKNOWN
private

Definition at line 164 of file TrafficSignBase.h.


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