CARLA
Loading...
Searching...
No Matches
SceneCaptureComponent2D_CARLA.h
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
7#pragma once
8
9#include <util/ue-header-guard-begin.h>
10#include "CoreMinimal.h"
11#include "Components/SceneCaptureComponent2D.h"
12#include <util/ue-header-guard-end.h>
13
14#include "SceneCaptureComponent2D_CARLA.generated.h"
15
16
17
18UCLASS(hidecategories=(Collision, Object, Physics, SceneComponent, Mobility))
20{
21 GENERATED_BODY()
22public:
23
24 USceneCaptureComponent2D_CARLA(const FObjectInitializer& = FObjectInitializer::Get());
25
26 UPROPERTY()
27 TObjectPtr<AActor> ViewActor;
28
29 virtual const AActor* GetViewOwner() const override;
30
31 /// Free the persistent per-view render state (Lumen scene, TSR/TAA
32 /// history, shadow caches...) right away. USceneCaptureComponent only
33 /// releases ViewStates when the UObject is garbage collected, which in
34 /// -game can be a minute after the sensor is destroyed; with
35 /// bAlwaysPersistRenderingState that state is hundreds of MB per view.
36 /// Game thread only; call after the render thread is done with the view
37 /// (FlushRenderingCommands).
38 void ReleaseViewStates()
39 {
40 ViewStates.Empty();
41 }
42};