18#include "Components/SceneCaptureComponent2D.h"
32 const FObjectInitializer &ObjectInitializer)
33 : Super(ObjectInitializer)
48 Super::SetUpSceneCaptureComponent(SceneCapture);
52 ApplyViewMode(VMI_Unlit,
true, SceneCapture.ShowFlags);
56 SceneCapture.ShowFlags.SetNotDrawTaggedComponents(
false);
59 SceneCapture.ShowFlags.SetAtmosphere(
false);
63 SceneCapture.PrimitiveRenderMode = ESceneCapturePrimitiveRenderMode::PRM_UseShowOnlyList;
66 TArray<UObject *> TaggedComponents;
69 GetObjectsOfClass(UTaggedComponent::StaticClass(), TaggedComponents,
false, EObjectFlags::RF_ClassDefaultObject, EInternalObjectFlags::AllFlags);
72 TArray<UPrimitiveComponent *> ShowOnlyComponents;
74 for (
UObject *Object : TaggedComponents) {
78 SceneCapture.ShowOnlyComponents.Emplace(Component);
92 TArray<UObject *> TaggedComponents;
95 GetObjectsOfClass(UTaggedComponent::StaticClass(), TaggedComponents,
false, EObjectFlags::RF_ClassDefaultObject, EInternalObjectFlags::AllFlags);
98 SceneCapture->ClearShowOnlyComponents();
100 for (
UObject *Object : TaggedComponents) {
104 SceneCapture->ShowOnlyComponents.Emplace(Component);
109 FPixelReader::SendPixelsInRenderThread<AInstanceSegmentationCamera, FColor>(*
this);
TSharedPtr< const FActorInfo > carla::rpc::ActorState UWorld * World
void SetUpSceneCaptureComponent(USceneCaptureComponent2D &SceneCapture) override
static FActorDefinition GetSensorDefinition()
void PostPhysTick(UWorld *World, ELevelTick TickType, float DeltaSeconds) override
AInstanceSegmentationCamera(const FObjectInitializer &ObjectInitializer)
USceneCaptureComponent2D * GetCaptureComponent2D()
bool AddPostProcessingMaterial(const FString &Path)
Load the UMaterialInstanceDynamic at the given Path and append it to the list of shaders with Weight.
static FActorDefinition MakeCameraDefinition(const FString &Id, bool bEnableModifyingPostProcessEffects=false)
创建一个相机参与者定义。