Agrarsense
Static Public Member Functions | List of all members
UAgrarsenseStatics Class Reference

#include <AgrarsenseStatics.h>

Inheritance diagram for UAgrarsenseStatics:
Inheritance graph
[legend]
Collaboration diagram for UAgrarsenseStatics:
Collaboration graph
[legend]

Static Public Member Functions

static AAgrarsenseGameModeBaseGetGameMode (const UObject *WorldContextObject)
 
static UAgrarsenseGameInstanceGetGameInstance (const UObject *WorldContextObject)
 
static UROSIntegrationGameInstance * GetROSGameInstance (const UObject *WorldContextObject)
 
static ALidarManagerGetLidarManager (const UObject *WorldContextObject)
 
static UROSHandlerGetROSHandle (const UObject *WorldContextObject)
 
static AInstancedRendererGetInstancedRenderer (const UObject *WorldContextObject)
 
static AWeatherGetWeatherActor (const UObject *WorldContextObject)
 
static ASpectatorGetSpectator (const UObject *WorldContextObject)
 
static ASimulationLevelManagerGetSimulationLevelManager (const UObject *WorldContextObject)
 
static UWorld * GetWorldStatic ()
 
static USensorManagerGetSensorManager ()
 
static UAgrarsenseSettingsGetAgrarsenseSettings ()
 

Detailed Description

The UAgrarsenseStatics class is a utility blueprint function library that provides static methods for retrieving various simulation related objects and instances in the Agrarsense simulator.

Definition at line 31 of file AgrarsenseStatics.h.

Member Function Documentation

◆ GetAgrarsenseSettings()

UAgrarsenseSettings * UAgrarsenseStatics::GetAgrarsenseSettings ( )
static

◆ GetGameInstance()

UAgrarsenseGameInstance * UAgrarsenseStatics::GetGameInstance ( const UObject *  WorldContextObject)
static

Get UAgrarsenseGameInstance pointer.

Returns
UAgrarsenseGameInstance pointer or nullptr

Definition at line 31 of file AgrarsenseStatics.cpp.

32{
33 return Cast<UAgrarsenseGameInstance>(UGameplayStatics::GetGameInstance(WorldContextObject));
34}

◆ GetGameMode()

AAgrarsenseGameModeBase * UAgrarsenseStatics::GetGameMode ( const UObject *  WorldContextObject)
static

Get AAgrarsenseGameModeBase pointer.

Returns
AAgrarsenseGameModeBase pointer or nullptr

Definition at line 26 of file AgrarsenseStatics.cpp.

27{
28 return Cast<AAgrarsenseGameModeBase>(UGameplayStatics::GetGameMode(WorldContextObject));
29}

Referenced by GetInstancedRenderer(), GetLidarManager(), GetROSHandle(), GetSimulationLevelManager(), GetSpectator(), and GetWeatherActor().

◆ GetInstancedRenderer()

AInstancedRenderer * UAgrarsenseStatics::GetInstancedRenderer ( const UObject *  WorldContextObject)
static

◆ GetLidarManager()

ALidarManager * UAgrarsenseStatics::GetLidarManager ( const UObject *  WorldContextObject)
static

Get ALidarManager pointer.

Returns
ALidarManager pointer or nullptr

Definition at line 41 of file AgrarsenseStatics.cpp.

42{
43 AAgrarsenseGameModeBase* GameMode = GetGameMode(WorldContextObject);
44 return GameMode != nullptr ? GameMode->GetLidarManager() : nullptr;
45}
ALidarManager * GetLidarManager()

References GetGameMode(), and AAgrarsenseGameModeBase::GetLidarManager().

Referenced by ALidar::BeginPlay(), ALidar::EndPlay(), and UROSCommands::HandleSetSaveCombinedPointcloudToDisk().

◆ GetROSGameInstance()

UROSIntegrationGameInstance * UAgrarsenseStatics::GetROSGameInstance ( const UObject *  WorldContextObject)
static

Get UROSIntegrationGameInstance pointer.

Returns
UROSIntegrationGameInstance pointer or nullptr

Definition at line 36 of file AgrarsenseStatics.cpp.

37{
38 return Cast<UROSIntegrationGameInstance>(UGameplayStatics::GetGameInstance(WorldContextObject));
39}

Referenced by ASensor::BeginPlay(), UROSCommands::SetupROSCommandTopic(), and UInfoTopic::SetupROSInfoTopic().

◆ GetROSHandle()

UROSHandler * UAgrarsenseStatics::GetROSHandle ( const UObject *  WorldContextObject)
static

◆ GetSensorManager()

USensorManager * UAgrarsenseStatics::GetSensorManager ( )
static

Get USensorManager* pointer.

Returns
USensorManager pointer or nullptr

Definition at line 88 of file AgrarsenseStatics.cpp.

89{
90 return USensorManager::Get();
91}
static USensorManager * Get()

References USensorManager::Get().

◆ GetSimulationLevelManager()

ASimulationLevelManager * UAgrarsenseStatics::GetSimulationLevelManager ( const UObject *  WorldContextObject)
static

Get ASimulationLevelManager* pointer.

Returns
ASimulationLevelManager pointer or nullptr

Definition at line 71 of file AgrarsenseStatics.cpp.

72{
73 AAgrarsenseGameModeBase* GameMode = GetGameMode(WorldContextObject);
74 return GameMode != nullptr ? GameMode->GetSimulationLevelManager() : nullptr;
75}
ASimulationLevelManager * GetSimulationLevelManager()

References GetGameMode(), and AAgrarsenseGameModeBase::GetSimulationLevelManager().

Referenced by USimulatorJsonParser::SpawnSensorWorld(), and USimulatorJsonParser::TeleportSpectatorOrFollowActorIfField().

◆ GetSpectator()

ASpectator * UAgrarsenseStatics::GetSpectator ( const UObject *  WorldContextObject)
static

◆ GetWeatherActor()

AWeather * UAgrarsenseStatics::GetWeatherActor ( const UObject *  WorldContextObject)
static

Get AWeather pointer.

Returns
AWeather pointer or nullptr

Definition at line 59 of file AgrarsenseStatics.cpp.

60{
61 AAgrarsenseGameModeBase* GameMode = GetGameMode(WorldContextObject);
62 return GameMode != nullptr ? GameMode->GetWeatherActor() : nullptr;
63}

References GetGameMode(), and AAgrarsenseGameModeBase::GetWeatherActor().

Referenced by AInstancedRenderer::BeginPlay(), ALidar::BeginPlay(), USimulatorJsonParser::ChangeWeather(), AInstancedRenderer::EndPlay(), ALidar::EndPlay(), and UROSCommands::HandleExportWeather().

◆ GetWorldStatic()

UWorld * UAgrarsenseStatics::GetWorldStatic ( )
static

Get UWorld* pointer from static class. Only works in runtime.

Returns
UWorld pointer or nullptr

Definition at line 77 of file AgrarsenseStatics.cpp.

78{
79 UWorld* World = nullptr;
80 if (GEngine && GEngine->GameViewport)
81 {
82 World = GEngine->GameViewport->GetWorld();
83 }
84
85 return World;
86}

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