13 #include "GameFramework/Actor.h"
14 #include "NVSceneCapturerUtils.h"
15 #include "NVAnnotatedActor.generated.h"
21 UCLASS(Blueprintable, ClassGroup = (NVIDIA), Config = Engine, HideCategories = (Replication, Tick, Tags, Input))
30 void SetStaticMesh(
class UStaticMesh* NewMesh);
32 virtual TSharedPtr<FJsonObject> GetCustomAnnotatedData()
const;
38 FVector GetCuboidCenterLocal()
const
40 return CuboidCenterLocal;
42 void SetClassSegmentationId(uint32 NewId);
45 virtual void PostLoad()
override;
46 virtual void BeginPlay()
override;
47 virtual void PostInitializeComponents()
override;
49 #if WITH_EDITORONLY_DATA
50 virtual void PostEditChangeProperty(
struct FPropertyChangedEvent& PropertyChangedEvent)
override;
51 void OnActorSelected(UObject* Object);
52 #endif //WITH_EDITORONLY_DATA
54 void UpdateStaticMesh();
55 void UpdateMeshCuboid();
57 FMatrix GetMeshInitialMatrix()
const;
59 FMatrix CalculatePCA(
const class UStaticMesh* Mesh);
60 FVector ComputeEigenVector(
const FMatrix& Mat);
63 UPROPERTY(VisibleAnywhere, BlueprintReadOnly)
64 class UNVCapturableActorTag* AnnotationTag;
68 UPROPERTY(VisibleAnywhere, BlueprintReadOnly)
69 class UStaticMeshComponent* MeshComponent;
71 UPROPERTY(VisibleAnywhere, BlueprintReadOnly)
72 class UBoxComponent* BoxComponent;
75 UPROPERTY(VisibleAnywhere, BlueprintReadOnly)
80 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category =
"AnnotatedActor")
81 bool bForceCenterOfBoundingBoxAtRoot;
84 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category =
"AnnotatedActor")
85 bool bSetClassNameFromMesh;
88 UPROPERTY(VisibleAnywhere)
91 UPROPERTY(VisibleAnywhere)
92 FVector CuboidDimension;
94 UPROPERTY(VisibleAnywhere)
95 FVector CuboidCenterLocal;
97 UPROPERTY(VisibleAnywhere)
100 UPROPERTY(VisibleAnywhere)
101 FRotator PCARotation;
103 UPROPERTY(VisibleAnywhere)
104 FVector PCADirection;