Files
WizardingHub/Source/WizardingCentral/Utils/OneDollar/UniStrokeRecognizer.h
T

35 lines
864 B
C

// Copyright Team Lumi. All Rights Reserved.
#pragma once
#include "CoreMinimal.h"
#include "UniStrokeResult.h"
#include "UniStrokeTemplate.h"
#include "UniStrokeRecognizer.generated.h"
static constexpr int NumTemplates = 16;
static const float Diagonal = FMath::Sqrt(2 * FMath::Square(SquareSize));
static const float HalfDiagonal = 0.5 * Diagonal;
static constexpr float AngleRange = FMath::DegreesToRadians(45.0);
static constexpr float AnglePrecision = FMath::DegreesToRadians(2.0);
USTRUCT()
struct WIZARDINGCENTRAL_API FUniStrokeRecognizer
{
GENERATED_BODY()
FUniStrokeRecognizer();
~FUniStrokeRecognizer();
FUniStrokeResult
Recognize(const TArray<FVector2D>& VectorPoints, const bool& UseProtractor);
void
AddTemplate(const FString& Name, const TArray<FVector2D>& VectorPoints);
void
Reset();
TArray<FUniStrokeTemplate> Templates;
};