9#include "Engine/World.h"
20 PrimaryActorTick.bCanEverTick =
false;
27 FilePrefix =
"Data/InstanceSegmentationCamera_";
29 AddPostProcessingMaterial(
"/Game/Agrarsense/Materials/PostProcessingMaterials/M_InstanceSegmentation.M_InstanceSegmentation");
30 Super::Init(parameters, SimulateSensor);
36#ifdef InstanceSegmentationPass_EXISTS
38 UWorld* World = GetWorld();
41 GEngine->Exec(World, TEXT(
"r.EnableSegmentationRendering 1"));
46 SimulatorLog::Log(
"InstanceSegmentationCamera.cpp: This sensor is only supported with our AGRARSENSE fork of the engine.");
53 Super::EndPlay(EndPlayReason);
55#ifdef InstanceSegmentationPass_EXISTS
59 UWorld* World = GetWorld();
62 GEngine->Exec(World, TEXT(
"r.EnableSegmentationRendering 0"));
static int32 InstanceSegmentationCameraCount
void AddPostProcessingMaterial(const FString &Path, float Weight=1.0f)
void SetShadowRendering(bool RenderShadows)
void SetTemporalAA(bool SetTemporal)
void Init(FCameraBaseParameters parameters, bool SimulateSensor=true) override
virtual void EndPlay(const EEndPlayReason::Type EndPlayReason) final override
AInstanceSegmentationCamera(const FObjectInitializer &ObjectInitializer)
static void Log(const FString &Message, bool LogToTextFile=true, bool LogToROS=true)