Space Plunder
Loading...
Searching...
No Matches
ALSMathLibrary.h
Go to the documentation of this file.
1// Copyright: Copyright (C) 2022 Doğa Can Yanıkoğlu
2// Source Code: https://github.com/dyanikoglu/ALS-Community
3
4#pragma once
5
7#include "Kismet/KismetSystemLibrary.h"
8#include "CoreMinimal.h"
9#include "Engine/World.h"
11#include "ALSMathLibrary.generated.h"
12
13class UCapsuleComponent;
14
18UCLASS()
19class ALSV4_CPP_API UALSMathLibrary : public UBlueprintFunctionLibrary
20{
21 GENERATED_BODY()
22
23public:
24 UFUNCTION(BlueprintCallable, Category = "ALS|Math Utils")
25 static FTransform MantleComponentLocalToWorld(const FALSComponentAndTransform& CompAndTransform);
26
27 UFUNCTION(BlueprintCallable, Category = "ALS|Math Utils")
28 static FTransform TransformSub(const FTransform& T1, const FTransform& T2)
29 {
30 return FTransform(T1.GetRotation().Rotator() - T2.GetRotation().Rotator(),
31 T1.GetLocation() - T2.GetLocation(), T1.GetScale3D() - T2.GetScale3D());
32 }
33
34 UFUNCTION(BlueprintCallable, Category = "ALS|Math Utils")
35 static FTransform TransformAdd(const FTransform& T1, const FTransform& T2)
36 {
37 return FTransform(T1.GetRotation().Rotator() + T2.GetRotation().Rotator(),
38 T1.GetLocation() + T2.GetLocation(), T1.GetScale3D() + T2.GetScale3D());
39 }
40
41 UFUNCTION(BlueprintCallable, Category = "ALS|Math Utils")
42 static FVector GetCapsuleBaseLocation(float ZOffset, UCapsuleComponent* Capsule);
43
44 UFUNCTION(BlueprintCallable, Category = "ALS|Math Utils")
45 static FVector GetCapsuleLocationFromBase(FVector BaseLocation, float ZOffset, UCapsuleComponent* Capsule);
46
47 UFUNCTION(BlueprintCallable, Category = "ALS|Math Utils")
48 static bool CapsuleHasRoomCheck(UCapsuleComponent* Capsule, FVector TargetLocation, float HeightOffset,
49 float RadiusOffset, EDrawDebugTrace::Type DebugType = EDrawDebugTrace::Type::None, bool DrawDebugTrace = false);
50
51 UFUNCTION(BlueprintCallable, Category = "ALS|Math Utils")
52 static bool AngleInRange(float Angle, float MinAngle, float MaxAngle, float Buffer, bool IncreaseBuffer);
53
54 UFUNCTION(BlueprintCallable, Category = "ALS|Math Utils")
55 static EALSMovementDirection CalculateQuadrant(EALSMovementDirection Current, float FRThreshold, float FLThreshold,
56 float BRThreshold,
57 float BLThreshold, float Buffer, float Angle);
58};
EALSMovementDirection
Definition ALSCharacterEnumLibrary.h:169
UCLASS(Blueprintable, BlueprintType, ClassGroup=(BucciGames), meta=(BlueprintSpawnableComponent)) class CHATSYSTEM_API UChatSystemComponent
Definition ChatSystemComponent.h:13
Definition ALSMathLibrary.h:20
Definition ALSCharacterStructLibrary.h:31