9#include "GameFramework/Actor.h"
10#include "Components/PrimitiveComponent.h"
16#include "Tagger.generated.h"
38 static void TagActor(
const AActor &
Actor,
bool bTagForSemanticSegmentation);
47 static void TagActorsInLevel(UWorld &
World,
bool bTagForSemanticSegmentation);
49 static void TagActorsInLevel(ULevel &Level,
bool bTagForSemanticSegmentation);
59 static void GetTagsOfTaggedActor(
const AActor &
Actor, TSet<crp::CityObjectLabel> &Tags);
64 return (Tag == GetTagOfTaggedComponent(Component));
78 const FString Path = Object->GetPathName();
79 TArray<FString> StringArray;
80 Path.ParseIntoArray(StringArray, TEXT(
"/"),
false);
81 return (StringArray.Num() > 4 ? GetLabelByFolderName(StringArray[4]) : crp::CityObjectLabel::None);
96 virtual void PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent)
override;
101 UPROPERTY(Category =
"Tagger", EditAnywhere)
102 bool bTriggerTagObjects = false;
104 UPROPERTY(Category = "Tagger", EditAnywhere)
105 bool bTagForSemanticSegmentation = false;
TSharedPtr< const FActorInfo > carla::rpc::ActorState UWorld * World
TSharedPtr< const FActorInfo > carla::rpc::ActorState UWorld Actor
根据语义分割设置 actor 的自定义深度模板值 到他们的网格中。
static crp::CityObjectLabel GetTagOfTaggedComponent(const UPrimitiveComponent &Component)
检索已标记组件的标记。
static bool MatchComponent(const UPrimitiveComponent &Component, crp::CityObjectLabel Tag)
如果 Component 已使用给定的 标记进行标记,则返回 true。
static crp::CityObjectLabel GetLabelByPath(const T *Object)
计算特定对象对应的 label 的方法 使用存储它的文件夹路径