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 AInstancedRendererManagerGetInstancedRenderer (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 30 of file AgrarsenseStatics.cpp.

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

◆ GetGameMode()

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

Get AAgrarsenseGameModeBase pointer.

Returns
AAgrarsenseGameModeBase pointer or nullptr

Definition at line 25 of file AgrarsenseStatics.cpp.

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

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

◆ GetInstancedRenderer()

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

Get AInstancedRendererManager pointer.

Returns
AInstancedRendererManager pointer or nullptr

Definition at line 52 of file AgrarsenseStatics.cpp.

53{
54 AAgrarsenseGameModeBase* GameMode = GetGameMode(WorldContextObject);
55 return GameMode != nullptr ? GameMode->GetInstancedRenderer() : nullptr;
56}
AInstancedRendererManager * GetInstancedRenderer()
static AAgrarsenseGameModeBase * GetGameMode(const UObject *WorldContextObject)

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

Referenced by AInstancedActor::AddToInstancedRendering(), ADeletionVolume::DestroyOverlappingActors(), and UAgrarsenseSettings::SetInstancedRenderingVisibility().

◆ GetLidarManager()

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

Get ALidarManager pointer.

Returns
ALidarManager pointer or nullptr

Definition at line 40 of file AgrarsenseStatics.cpp.

41{
42 AAgrarsenseGameModeBase* GameMode = GetGameMode(WorldContextObject);
43 return GameMode != nullptr ? GameMode->GetLidarManager() : nullptr;
44}
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 35 of file AgrarsenseStatics.cpp.

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

Referenced by ASensor::BeginPlay(), APIDDrone::CreateTopic(), 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 87 of file AgrarsenseStatics.cpp.

88{
89 return USensorManager::Get();
90}
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 70 of file AgrarsenseStatics.cpp.

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

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

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

◆ 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 58 of file AgrarsenseStatics.cpp.

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

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

Referenced by AInstancedActorRenderer::BeginPlay(), ALidar::BeginPlay(), USimulatorJsonParser::ChangeWeather(), AInstancedActorRenderer::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 76 of file AgrarsenseStatics.cpp.

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

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