Yasiu Math 1
Collection of mathematic functions that help create game mechanics and procedural tools
Loading...
Searching...
No Matches
YasiuMathBPLibrary.h
1/*
2 * Copyright (c) 2025 Grzegorz Krug.
3 * All Rights Reserved.
4 */
5#pragma once
6
7
8#include "CoreMinimal.h"
9#include "Templates/Tuple.h"
10#include "Kismet/BlueprintFunctionLibrary.h"
11
12#include "YasiuMathBPLibrary.generated.h"
13
14
18UCLASS(BlueprintType)
19class UYasiuMathFunctionLibrary : public UBlueprintFunctionLibrary {
20 GENERATED_BODY()
21
22public:
30 UFUNCTION(BlueprintCallable, Category = "Math|Yasiu|Trigonometry")
31 void SpreadPointsOnTangentByXY( TArray<FVector2D>& out, const double X, const double Y, const double spreadDistance );
32
41 UFUNCTION(BlueprintCallable, Category = "Math|Yasiu|Trigonometry")
42 void SpreadPointsOnTangentByAngleRadius( TArray<FVector2D>& out, double angle, double radius, double spreadDistance );
43
44
57 UFUNCTION(BlueprintCallable, Category = "Math|Yasiu|Trigonometry")
58 double FindMinimalRadiusForIntersectingTangentsOnArc( double alfa, double beta, double symmetricWidth );
59
75 UFUNCTION(BlueprintCallable, Category = "Math|Yasiu|Trigonometry")
76 FVector2D FindMinimalRadiusForIntersectingTangentsOnArcAsymmetric( double alfa, double beta, double widthA, double widthB );
77
83 UFUNCTION(BlueprintCallable, Category = "Math|Yasiu|Convex")
84 void ConvexHull2D( TArray<int>& result, const TArray<FVector2D>& polygonPoints );
85
89 UFUNCTION(BlueprintCallable, Category = "Math|Yasiu|Convex")
90 double ClipAngleToCycle( double angle, double period );
91};
Definition YasiuMathBPLibrary.h:19
double FindMinimalRadiusForIntersectingTangentsOnArc(double alfa, double beta, double symmetricWidth)
void ConvexHull2D(TArray< int > &result, const TArray< FVector2D > &polygonPoints)
FVector2D FindMinimalRadiusForIntersectingTangentsOnArcAsymmetric(double alfa, double beta, double widthA, double widthB)
void SpreadPointsOnTangentByXY(TArray< FVector2D > &out, const double X, const double Y, const double spreadDistance)
double ClipAngleToCycle(double angle, double period)
Normalize angle to its period, to be in range <0, period>.
void SpreadPointsOnTangentByAngleRadius(TArray< FVector2D > &out, double angle, double radius, double spreadDistance)