14 #include "Components/SceneCaptureComponent2D.h" 22 const FObjectInitializer &ObjectInitializer)
23 : Super(ObjectInitializer)
32 Super::SetUpSceneCaptureComponent(SceneCapture);
34 ApplyViewMode(VMI_Unlit,
true, SceneCapture.ShowFlags);
36 SceneCapture.ShowFlags.SetNotDrawTaggedComponents(
false);
38 SceneCapture.ShowFlags.SetAtmosphere(
false);
40 SceneCapture.PrimitiveRenderMode = ESceneCapturePrimitiveRenderMode::PRM_UseShowOnlyList;
42 TArray<UObject *> TaggedComponents;
43 GetObjectsOfClass(UTaggedComponent::StaticClass(), TaggedComponents,
false, EObjectFlags::RF_ClassDefaultObject, EInternalObjectFlags::AllFlags);
45 TArray<UPrimitiveComponent *> ShowOnlyComponents;
46 for (
UObject *Object : TaggedComponents) {
48 SceneCapture.ShowOnlyComponents.Emplace(Component);
57 TArray<UObject *> TaggedComponents;
58 GetObjectsOfClass(UTaggedComponent::StaticClass(), TaggedComponents,
false, EObjectFlags::RF_ClassDefaultObject, EInternalObjectFlags::AllFlags);
60 SceneCapture->ClearShowOnlyComponents();
61 for (
UObject *Object : TaggedComponents) {
63 SceneCapture->ShowOnlyComponents.Emplace(Component);
66 FPixelReader::SendPixelsInRenderThread<AInstanceSegmentationCamera, FColor>(*this);
AInstanceSegmentationCamera(const FObjectInitializer &ObjectInitializer)
void PostPhysTick(UWorld *World, ELevelTick TickType, float DeltaSeconds) override
bool AddPostProcessingMaterial(const FString &Path)
Load the UMaterialInstanceDynamic at the given Path and append it to the list of shaders with Weight...
A definition of a Carla Actor with all the variation and attributes.
USceneCaptureComponent2D * GetCaptureComponent2D()
static FActorDefinition GetSensorDefinition()
void SetUpSceneCaptureComponent(USceneCaptureComponent2D &SceneCapture) override
static FActorDefinition MakeCameraDefinition(const FString &Id, bool bEnableModifyingPostProcessEffects=false)