Add class Tagger

This commit is contained in:
nsubiron 2017-04-10 14:48:25 +02:00
parent 47b7512af7
commit 1e43990faa
2 changed files with 56 additions and 0 deletions

27
Source/Carla/Tagger.cpp Normal file
View File

@ -0,0 +1,27 @@
// CARLA, Copyright (C) 2017 Computer Vision Center (CVC)
#include "Carla.h"
#include "Tagger.h"
ATagger::ATagger()
{
PrimaryActorTick.bCanEverTick = false;
}
#if WITH_EDITOR
void ATagger::PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent)
{
Super::PostEditChangeProperty(PropertyChangedEvent);
if (PropertyChangedEvent.Property) {
if (bTriggerTagObjects) {
TagObjects();
}
}
bTriggerTagObjects = false;
}
#endif // WITH_EDITOR
void ATagger::TagObjects()
{
// Do stuff here.
}

29
Source/Carla/Tagger.h Normal file
View File

@ -0,0 +1,29 @@
// CARLA, Copyright (C) 2017 Computer Vision Center (CVC)
#pragma once
#include "GameFramework/Actor.h"
#include "Tagger.generated.h"
UCLASS()
class CARLA_API ATagger : public AActor
{
GENERATED_BODY()
public:
ATagger();
protected:
#if WITH_EDITOR
virtual void PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent) override;
#endif // WITH_EDITOR
private:
void TagObjects();
UPROPERTY(Category = "Tagger", EditAnywhere)
bool bTriggerTagObjects = false;
};