CARLA
Loading...
Searching...
No Matches
SemanticSegmentationCamera_WideAngleLens.cpp
Go to the documentation of this file.
1// Copyright (c) 2026 Computer Vision Center (CVC) at the Universitat Autonoma
2// de Barcelona (UAB).
3//
4// This work is licensed under the terms of the MIT license.
5// For a copy, see <https://opensource.org/licenses/MIT>.
6
8#include "Carla.h"
9
11
13
19
21 const FObjectInitializer &ObjectInitializer)
22 : Super(ObjectInitializer)
23{
24 Super::SetCubemapSampler(CameraModelUtil::GetSampler(ESamplerFilter::SF_Point));
25
26 AddPostProcessingMaterial(TEXT("Material'/Carla/PostProcessingMaterials/GTMaterial.GTMaterial'"));
27}
28
30 TArrayView<USceneCaptureComponent2D_CARLA*> SceneCaptures)
31{
32 Super::SetUpSceneCaptureComponents(SceneCaptures);
33 // GTMaterial samples the segmentation ID buffer; opt every face capture
34 // into the segmentation pass (same as the pinhole ASemanticSegmentationCamera).
35 for (auto SceneCapture : SceneCaptures)
36 if (SceneCapture != nullptr)
37 SceneCapture->bRequiresSegmentationPass = true;
38}
39
40void ASemanticSegmentationCamera_WideAngleLens::PostPhysTick(UWorld *World, ELevelTick TickType, float DeltaSeconds)
41{
43 // Skip the whole 6-face capture + compute + readback pipeline when no
44 // client is subscribed.
46 return;
48}
static void CaptureAndSendToClient(TSensor &Sensor)
Capture the six faces, project them into the lens, and deliver the image through ImageUtil's per-tick...
void SetUpSceneCaptureComponents(TArrayView< USceneCaptureComponent2D_CARLA * > SceneCaptures) override
ASemanticSegmentationCamera_WideAngleLens(const FObjectInitializer &ObjectInitializer)
void PostPhysTick(UWorld *World, ELevelTick TickType, float DeltaSeconds) override
static FActorDefinition MakeWideAngleLensCameraDefinition(const FString &Id, bool bEnableModifyingPostProcessEffects=false)
FRHISamplerState * GetSampler(ESamplerFilter Filter)
A definition of a Carla Actor with all the variation and attributes.