8#include "CoreMinimal.h"
9#include "GameFramework/Actor.h"
10#include "Kismet/GameplayStatics.h"
12#include "PhysicsEngine/PhysicsAsset.h"
14#include "Tagger.generated.h"
16class USkeletalMeshComponent;
17class AGeoReferencingSystem;
18class UStaticMeshComponent;
27 UPROPERTY(VisibleAnywhere, BlueprintReadWrite)
30 UPROPERTY(VisibleAnywhere, BlueprintReadWrite)
31 UStaticMeshComponent* StaticMeshComponent;
33 UPROPERTY(VisibleAnywhere, BlueprintReadWrite)
34 USkeletalMeshComponent* SkeletalMeshComponent;
36 UPROPERTY(VisibleAnywhere, BlueprintReadWrite)
39 UPROPERTY(VisibleAnywhere, BlueprintReadWrite)
50class AGRARSENSE_API
ATagger : public AActor
58 UFUNCTION(BlueprintCallable)
59 void ExportObjectLocationsToCSV();
61 UFUNCTION(BlueprintCallable)
62 AActor* GetActorByInstanceID(
float InstanceID);
66 virtual void BeginPlay()
override;
68 virtual void EndPlay(
const EEndPlayReason::Type EndPlayReason)
override;
74 void TagExistingActors();
76 void OnActorSpawned(AActor* Actor);
78 void TagActor(AActor& Actor);
82 float SetStencilValue(UPrimitiveComponent& Component, AActor& Actor,
const ELabels& Label);
84 void TagLandscape(ALandscape* Landscape, AActor& Actor);
86 ELabels GetLabelFromString(
const FString& String);
88 ELabels GetLabelFromStaticComponent(UStaticMeshComponent* StaticMeshComponentPtr);
90 ELabels GetLabelFromSkeletalMeshComponent(USkeletalMeshComponent* USkeletalMeshComponentPtr);
92 ELabels GetLabelFromPath(
const FString& Path, FString& FolderName);
97 if (!Object->ComponentTags.IsEmpty())
99 return GetLabelFromString(Object->ComponentTags[0].ToString());
107 AGeoReferencingSystem* GeoReferencingSystem =
nullptr;
117 bool TerrainIDCached =
false;
119 uint32 CachedTerrainID = 0;
TMap< FString, ELabels > LabelMap
ELabels GetLabelFromTag(const T *Object)
TArray< FTaggedActorData > TaggedActors
FDelegateHandle ActorSpawnedDelegateHandle
static UCSVFile * CreateCSVFile(const FString &FileNameWithoutExtension, const FCSVFileSettings &Settings)