13 #include "Components/SceneComponent.h"
14 #include "NVSceneCapturerUtils.h"
15 #include "NVSceneFeatureExtractor.h"
16 #include "NVSceneFeatureExtractor_DataExport.h"
17 #include "NVSceneFeatureExtractor_ImageExport.h"
18 #include "NVTextureReader.h"
19 #include "NVSceneCapturerViewpointComponent.generated.h"
21 DECLARE_LOG_CATEGORY_EXTERN(LogNVSceneCapturerViewpointComponent, Log, All)
23 USTRUCT(BlueprintType)
29 FNVSceneCapturerViewpointSettings();
33 UPROPERTY(EditAnywhere, Category = Config)
37 UPROPERTY(EditAnywhere, Category = Config)
41 UPROPERTY(EditAnywhere, Category = Config)
42 FString ExportFileNamePostfix;
45 UPROPERTY(EditAnywhere, Category = FeatureExtraction, meta = (PinHiddenByDefault, InlineEditConditionToggle))
46 bool bOverrideFeatureExtractorSettings;
48 UPROPERTY(EditAnywhere, Category = FeatureExtraction, meta = (editcondition = "bOverrideFeatureExtractorSettings"))
52 UPROPERTY(EditAnywhere, Category = Settings, meta = (PinHiddenByDefault, InlineEditConditionToggle))
53 bool bOverrideCaptureSettings;
55 UPROPERTY(EditAnywhere, Category = Settings, meta = (editcondition="bOverrideCaptureSettings"))
64 UCLASS(Blueprintable, ClassGroup = (NVIDIA), meta = (BlueprintSpawnableComponent),
65 HideCategories = (Replication, ComponentReplication, Cooking, Events, ComponentTick, Actor, Input, Collision,
66 Physics, PhysX, Activation, Sockets, Rendering, LOD, Tags))
91 void SetupFeatureExtractors();
92 void UpdateCapturerSettings();
93 const FNVSceneCapturerViewpointSettings& GetSettings()
const;
95 const TArray<FNVFeatureExtractorSettings>& GetFeatureExtractorSettings()
const;
97 bool IsEnabled()
const;
98 FString GetDisplayName()
const;
100 void StartCapturing();
101 void StopCapturing();
104 virtual bool GetEditorPreviewInfo(
float DeltaTime, FMinimalViewInfo& ViewOut)
override;
105 #endif // WITH_EDITOR
108 virtual void BeginPlay() final;
109 virtual
void EndPlay(const EEndPlayReason::Type EndPlayReason) final;
110 virtual
void OnRegister() final;
111 virtual
void OnComponentDestroyed(
bool bDestroyingHierarchy) final;
112 virtual
void OnUpdateTransform(EUpdateTransformFlags UpdateTransformFlags, ETeleportType Teleport) final;
115 UPROPERTY(EditAnywhere, Category = Config, meta = (ShowOnlyInnerProperties))
116 FNVSceneCapturerViewpointSettings Settings;
125 #if WITH_EDITORONLY_DATA
128 class UDrawFrustumComponent* DrawFrustum;
131 class UStaticMesh* CameraMesh;
134 class UStaticMeshComponent* ProxyMeshComponent;
136 static
void AddReferencedObjects(UObject* InThis, FReferenceCollector& Collector);
138 void SetCameraMesh(UStaticMesh* Mesh);
141 void RefreshVisualRepresentation();
143 void OverrideFrustumColor(FColor OverrideColor);
144 void RestoreFrustumColor();
146 void ResetProxyMeshTransform();
148 void UpdateProxyMeshTransform();
UNVSceneCapturerViewpointComponent: Represents each viewpoint from where the capturer captures data...
TFunction< void(const FNVTexturePixelData &, UNVSceneFeatureExtractor_PixelData *, UNVSceneCapturerViewpointComponent *)> OnFinishedCaptureScenePixelsDataCallback
Callback function get called after the scene capture component finished capturing scene and read back...
TFunction< void(TSharedPtr< FJsonObject >, UNVSceneFeatureExtractor_AnnotationData *, UNVSceneCapturerViewpointComponent *)> OnFinishedCaptureSceneAnnotationDataCallback
Callback function get called after the scene capture component finished capturing scene's annotation ...
The scene exporter actor.