8#include "CoreMinimal.h"
9#include "GameFramework/Actor.h"
10#include "Kismet/GameplayStatics.h"
12#include "PhysicsEngine/PhysicsAsset.h"
16#include "Tagger.generated.h"
18class UStaticMeshComponent;
19class USkeletalMeshComponent;
28class AGRARSENSE_API
ATagger : public AActor
38 virtual void BeginPlay()
override;
40 virtual void EndPlay(
const EEndPlayReason::Type EndPlayReason)
override;
44 void TagExistingActors();
46 void OnActorSpawned(AActor* Actor);
48 void TagActor(AActor& Actor,
bool TagForSemanticSegmentation);
50 void SetStencilValue(UPrimitiveComponent& Component,
const ELabels& Label,
const bool SetRenderCustomDepth);
52 ELabels GetLabelFromString(
const FString& String);
54 ELabels GetLabelFromStaticComponent(UStaticMeshComponent* StaticMeshComponentPtr);
56 ELabels GetLabelFromSkeletalMeshComponent(USkeletalMeshComponent* USkeletalMeshComponentPtr);
58 ELabels GetLabelFromPath(
const FString& Path, FString& FolderName);
63 if (!Object->ComponentTags.IsEmpty())
65 return GetLabelFromString(Object->ComponentTags[0].ToString());
TMap< FString, ELabels > LabelMap
ELabels GetLabelFromTag(const T *Object)
FDelegateHandle ActorSpawnedDelegateHandle