17 #include "Runtime/Core/Public/Misc/App.h" 18 #include "PhysicsEngine/PhysicsSettings.h" 32 return std::max(std::thread::hardware_concurrency(), 4u) - 2u;
37 return FApp::IsBenchmarking() ? FApp::GetFixedDeltaTime() : TOptional<double>{};
42 FApp::SetBenchmarking(FixedDeltaSeconds.IsSet());
43 FApp::SetFixedDeltaTime(FixedDeltaSeconds.Get(0.0));
62 TRACE_CPUPROFILER_EVENT_SCOPE_STR(__FUNCTION__);
90 TRACE_CPUPROFILER_EVENT_SCOPE_STR(__FUNCTION__);
117 TRACE_CPUPROFILER_EVENT_SCOPE_STR(__FUNCTION__);
118 if (TickType == ELevelTick::LEVELTICK_All)
139 TRACE_CPUPROFILER_EVENT_SCOPE_STR(__FUNCTION__);
146 EpisodeRecorder->
Ticking(DeltaSeconds);
150 if ((TickType == ELevelTick::LEVELTICK_All) && (
CurrentEpisode !=
nullptr))
153 bool LightUpdatePending =
false;
157 if (CarlaLightSubsystem)
175 if (GEngine && GEngine->GameViewport)
void CheckPlayAfterMapLoaded(void)
bool IsUpdatePending() const
UCarlaEpisode * GetCurrentEpisode()
void OnEpisodeSettingsChanged(const FEpisodeSettings &Settings)
void BroadcastTick(const UCarlaEpisode &Episode, float DeltaSeconds, bool MapChange, bool PendingLightUpdate)
Send a message to every connected client with the info about the given Episode.
FDelegateHandle OnEpisodeSettingsChangeHandle
void SetEpisode(UCarlaEpisode *ThisEpisode)
static void FCarlaEngine_SetFixedDeltaSeconds(TOptional< double > FixedDeltaSeconds)
float TileStreamingDistance
static uint32 FCarlaEngine_GetNumberOfThreadsForRPCServer()
float ActorActiveDistance
static FOnEpisodeSettingsChange OnEpisodeSettingsChange
static uint64_t UpdateFrameCounter()
FDelegateHandle OnPostTickHandle
void SetStream(FDataMultiStream InStream)
Replace the Stream associated with this sensor.
FDataMultiStream Start(uint16_t RPCPort, uint16_t StreamingPort)
FWorldObserver WorldObserver
CarlaReplayer * GetReplayer(void)
static T Get(carla::rpc::Response< T > &response)
static void ResetFrameCounter(uint64_t Value=0)
void NotifyInitGame(const UCarlaSettings &Settings)
void OnPostTick(UWorld *World, ELevelTick TickType, float DeltaSeconds)
static uint64_t FrameCounter
void RunSome(uint32 Milliseconds)
TOptional< uint32 > StreamingPort
Optional setting for the secondary port.
void NotifyBeginEpisode(UCarlaEpisode &Episode)
ACarlaRecorder * Recorder
FEpisodeSettings CurrentSettings
void SetActorStreamingDistance(float Distance)
Global settings for CARLA.
UCarlaEpisode * CurrentEpisode
void ResetSimulationState()
ACarlaRecorder * GetRecorder() const
void SetLayerStreamingDistance(float Distance)
void Ticking(float DeltaSeconds)
void SetRecorder(ACarlaRecorder *Rec)
void OnPreTick(UWorld *World, ELevelTick TickType, float DeltaSeconds)
static TOptional< double > FCarlaEngine_GetFixedDeltaSeconds()
static ALargeMapManager * GetLargeMapManager(const UObject *WorldContextObject)
uint32 RPCPort
World port to listen for client connections.
double MaxSubstepDeltaTime
FEpisodeSettings EpisodeSettings
TOptional< double > FixedDeltaSeconds
void AsyncRun(uint32 NumberOfWorkerThreads)
FDelegateHandle OnPreTickHandle
void TickTimers(float DeltaSeconds)
void ApplySettings(const FEpisodeSettings &Settings)
void NotifyBeginEpisode(UCarlaEpisode &Episode)