3#include "../BasicTypes.h"
4#include "../GenericPlatform/GenericPlatformMath.h"
10#ifndef ENABLE_NAN_DIAGNOSTIC
11#define ENABLE_NAN_DIAGNOSTIC 0
15
16
19#define PI (3.1415926535897932f
)
20#define SMALL_NUMBER (1.e-8f
)
21#define KINDA_SMALL_NUMBER (1.e-4f
)
22#define BIG_NUMBER (3.4e+38f
)
23#define EULERS_NUMBER (2.71828182845904523536f
)
26#define MAX_FLT 3.402823466e+38F
29#define INV_PI (0.31830988618f
)
30#define HALF_PI (1.57079632679f
)
33#define DELTA (0.00001f
)
36
37
38
39#define FLOAT_NORMAL_THRESH (0.0001f
)
44#define THRESH_POINT_ON_PLANE (0.10f
)
45#define THRESH_POINT_ON_SIDE (0.20f
)
46#define THRESH_POINTS_ARE_SAME (0.00002f
)
47#define THRESH_POINTS_ARE_NEAR (0.015f
)
48#define THRESH_NORMALS_ARE_SAME (0.00002f
)
50#define THRESH_VECTORS_ARE_NEAR (0.0004f
)
52#define THRESH_SPLIT_POLY_WITH_PLANE (0.25f
)
53#define THRESH_SPLIT_POLY_PRECISELY (0.01f
)
54#define THRESH_ZERO_NORM_SQUARED (0.0001f
)
55#define THRESH_NORMALS_ARE_PARALLEL (0.999845f
)
56#define THRESH_NORMALS_ARE_ORTHOGONAL (0.017455f
)
58#define THRESH_VECTOR_NORMALIZED (0.01f
)
59#define THRESH_QUAT_NORMALIZED (0.01f
)
62
63
66
67
68
82 static FORCEINLINE int32
RandRange(int32 Min, int32 Max)
84 const int32 Range = Max - Min + 1;
89 static FORCEINLINE
float RandRange(
float InMin,
float InMax)
95 static FORCEINLINE
float FRandRange(
float InMin,
float InMax)
97 return InMin + (InMax - InMin) *
FRand();
107
108
109
110
111 template <
typename T>
122 static FORCEINLINE T
Max3(
const T A,
const T B,
const T C)
129 static FORCEINLINE T
Min3(
const T A,
const T B,
const T C)
143 static FORCEINLINE T
Clamp(
const T X,
const T Min,
const T Max)
145 return X < Min ? Min : X < Max ? X : Max;
152 return (Dividend + Divisor - 1) / Divisor;
158 return Dividend / Divisor;
162
163
164
165
166
167
168 static FORCEINLINE
void SinCos(
float* ScalarSin,
float* ScalarCos,
float Value)
171 float quotient =
INV_PI * 0.5f * Value;
174 quotient = (
float)(
int)(quotient + 0.5f);
178 quotient = (
float)(
int)(quotient - 0.5f);
180 float y = Value - 2.0f *
PI * quotient;
202 *ScalarSin = (((((-2.3889859e-08f * y2 + 2.7525562e-06f) * y2 - 0.00019840874f) * y2 + 0.0083333310f) * y2 -
203 0.16666667f) * y2 + 1.0f) * y;
206 float p = ((((-2.6051615e-07f * y2 + 2.4760495e-05f) * y2 - 0.0013888378f) * y2 + 0.041666638f) * y2 - 0.5f) * y2 +
208 *ScalarCos = sign * p;
217#define FASTASIN_HALF_PI (1.5707963050f
)
220
221
222
223
224
228 bool nonnegative = Value >= 0.0f;
229 float x =
Abs(Value
);
230 float omx = 1.0f - x;
237 float result = ((((((-0.0012624911f * x + 0.0066700901f) * x - 0.0170881256f) * x + 0.0308918810f) * x - 0.0501743046f
243#undef FASTASIN_HALF_PI
249
250
251
252
260
261
262
263
267 return DegVal * (
PI / 180.f);
274 float Delta = A2 - A1;
280 Delta = Delta - 360.0f;
282 else if (Delta < -180.0f)
286 Delta = Delta + 360.0f;
297 float Delta = A2 - A1;
303 Delta = Delta -
PI * 2.0f;
305 else if (Delta < -
PI)
309 Delta = Delta +
PI * 2.0f;
321 A -= (
float)
PI * 2.0f;
326 A += (
float)
PI * 2.0f;
349 static FORCEINLINE
void PolarToCartesian(
const float Rad,
const float Ang,
float& OutX,
float& OutY)
351 OutX = Rad *
Cos(Ang
);
352 OutY = Rad *
Sin(Ang
);
356 template <
class T,
class U>
357 static T
Lerp(
const T& A,
const T& B,
const U& Alpha)
377 template <
class T,
class U>
378 static T
BiLerp(
const T& P00,
const T& P10,
const T& P01,
const T& P11,
const U& FracX,
const U& FracY)
388
389
390
391
392
393
394
395
396 template <
class T,
class U>
397 static T
CubicInterp(
const T& P0,
const T& T0,
const T& P1,
const T& T1,
const U& A)
399 const float A2 =
A *
A;
400 const float A3 =
A2 *
A;
406
407
408
409
410
411
412
413
414 template <
class T,
class U>
417 T a = 6.f *
P0 + 3.f *
T0 + 3.f *
T1 - 6.f *
P1;
418 T b = -6.f *
P0 - 4.f *
T0 - 2.f *
T1 + 6.f *
P1;
421 const float A2 =
A *
A;
423 return (
a *
A2) + (
b *
A) +
c;
427
428
429
430
431
432
433
434
435 template <
class T,
class U>
438 T a = 12.f *
P0 + 6.f *
T0 + 6.f *
T1 - 12.f *
P1;
439 T b = -6.f *
P0 - 4.f *
T0 - 2.f *
T1 + 6.f *
P1;
471 static T
InterpStep(
const T& A,
const T& B,
float Alpha, int32 Steps)
565
566
567
568
569
570
571
572
573
574
576 static U
CubicCRSplineInterp(
const U& P0,
const U& P1,
const U& P2,
const U& P3,
const float T0,
const float T1,
577 const float T2,
const float T3,
const float T)
598
599
600
601
613
614
615
616
628
629
630
631
643
644
645
646
658
659
660
661
662
663
664
665
666
677 const float InterpFraction = (X - A) / (B - A);
678 return InterpFraction * InterpFraction * (3.0f - 2.0f * InterpFraction);
698 return CurrentGcd == 0 ? 0 : a / CurrentGcd * b;
static unsigned int GetBuildUniqueId()
ARK_API LPVOID GetDataAddress(const std::string &name)
ARK_API BitField GetBitField(LPVOID base, const std::string &name)
ARK_API BitField GetBitField(const void *base, const std::string &name)
ARK_API DWORD64 GetAddress(const void *base, const std::string &name)
ARK_API LPVOID GetAddress(const std::string &name)
FPlatformTypes::CHAR16 UCS2CHAR
A 16-bit character containing a UCS2 (Unicode, 16-bit, fixed-width) code unit, used for compatibility...
FWindowsPlatformTypes FPlatformTypes
#define PLATFORM_LITTLE_ENDIAN
FPlatformTypes::CHAR8 UTF8CHAR
An 8-bit character containing a UTF8 (Unicode, 8-bit, variable-width) code unit.
FPlatformTypes::CHAR16 UTF16CHAR
A 16-bit character containing a UTF16 (Unicode, 16-bit, variable-width) code unit.
FPlatformTypes::CHAR32 UTF32CHAR
A 32-bit character containing a UTF32 (Unicode, 32-bit, fixed-width) code unit.
#define THRESH_VECTOR_NORMALIZED
#define THRESH_NORMALS_ARE_PARALLEL
#define THRESH_POINTS_ARE_SAME
#define THRESH_POINT_ON_PLANE
#define THRESH_NORMALS_ARE_ORTHOGONAL
#define KINDA_SMALL_NUMBER
FORCEINLINE float ComputeSquaredDistanceFromBoxToPoint(const FVector &Mins, const FVector &Maxs, const FVector &Point)
FORCEINLINE FVector ClampVector(const FVector &V, const FVector &Min, const FVector &Max)
FORCEINLINE FVector operator*(float Scale, const FVector &V)
ApiUtils & operator=(ApiUtils &&)=delete
void SetCheatManager(UShooterCheatManager *cheatmanager)
void SetWorld(UWorld *uworld)
ApiUtils & operator=(const ApiUtils &)=delete
void SetShooterGameMode(AShooterGameMode *shooter_game_mode)
std::unordered_map< uint64, AShooterPlayerController * > steam_id_map_
UShooterCheatManager * GetCheatManager() const override
Returns a point to URCON CheatManager.
ApiUtils(ApiUtils &&)=delete
AShooterGameMode * shooter_game_mode_
AShooterGameMode * GetShooterGameMode() const override
Returns a pointer to AShooterGameMode.
void RemovePlayerController(AShooterPlayerController *player_controller)
UShooterCheatManager * cheatmanager_
void SetPlayerController(AShooterPlayerController *player_controller)
ServerStatus GetStatus() const override
Returns the current server status.
AShooterPlayerController * FindPlayerFromSteamId_Internal(uint64 steam_id) const override
~ApiUtils() override=default
void SetStatus(ServerStatus status)
UWorld * GetWorld() const override
Returns a pointer to UWorld.
ApiUtils(const ApiUtils &)=delete
static FString GetSteamName(AController *player_controller)
Returns the steam name of player.
static FORCEINLINE FString GetItemBlueprint(UPrimalItem *item)
Returns blueprint from UPrimalItem.
static FVector GetPosition(APlayerController *player_controller)
Returns the position of a player.
uint64 GetSteamIDForPlayerID(int player_id) const
static FORCEINLINE FString GetClassBlueprint(UClass *the_class)
Returns blueprint path from any UClass.
void SendServerMessageToAll(FLinearColor msg_color, const T *msg, Args &&... args)
Sends server message to all players. Using fmt::format.
virtual UShooterCheatManager * GetCheatManager() const =0
Returns a point to URCON CheatManager.
UPrimalGameData * GetGameData()
Returns pointer to Primal Game Data.
static bool IsRidingDino(AShooterPlayerController *player_controller)
Returns true if character is riding a dino, false otherwise.
AShooterGameState * GetGameState()
Get Shooter Game State.
virtual ~IApiUtils()=default
AShooterPlayerController * FindPlayerFromSteamName(const FString &steam_name) const
Finds player from the given steam name.
static UShooterCheatManager * GetCheatManagerByPC(AShooterPlayerController *SPC)
Get UShooterCheatManager* of player controller.
static uint64 GetPlayerID(AController *controller)
static bool IsPlayerDead(AShooterPlayerController *player)
Returns true if player is dead, false otherwise.
void SendNotificationToAll(FLinearColor color, float display_scale, float display_time, UTexture2D *icon, const T *msg, Args &&... args)
Sends notification (on-screen message) to all players. Using fmt::format.
APrimalDinoCharacter * SpawnDino(AShooterPlayerController *player, FString blueprint, FVector *location, int lvl, bool force_tame, bool neutered) const
Spawns a dino near player or at specific coordinates.
TArray< AShooterPlayerController * > FindPlayerFromCharacterName(const FString &character_name, ESearchCase::Type search, bool full_match) const
Finds all matching players from the given character name.
static FORCEINLINE FString GetBlueprint(UObjectBase *object)
Returns blueprint path from any UObject.
static FString GetCharacterName(AShooterPlayerController *player_controller, bool include_first_name=true, bool include_last_name=true)
Returns the character name of player.
TArray< AActor * > GetAllActorsInRange(FVector location, float radius, EServerOctreeGroup::Type ActorType)
Gets all actors in radius at location.
void SendChatMessageToAll(const FString &sender_name, const T *msg, Args &&... args)
Sends chat message to all players. Using fmt::format.
TArray< AActor * > GetAllActorsInRange(FVector location, float radius, EServerOctreeGroup::Type ActorType, TArray< AActor * > ignores)
Gets all actors in radius at location, with ignore actors.
virtual AShooterGameMode * GetShooterGameMode() const =0
Returns a pointer to AShooterGameMode.
static uint64 GetSteamIdFromController(AController *controller)
Returns Steam ID from player controller.
virtual UWorld * GetWorld() const =0
Returns a pointer to UWorld.
static bool TeleportToPos(AShooterPlayerController *player_controller, const FVector &pos)
Teleports player to the given position.
void SendNotification(AShooterPlayerController *player_controller, FLinearColor color, float display_scale, float display_time, UTexture2D *icon, const T *msg, Args &&... args)
Sends notification (on-screen message) to the specific player. Using fmt::format.
static uint64 GetPlayerID(APrimalCharacter *character)
virtual AShooterPlayerController * FindPlayerFromSteamId_Internal(uint64 steam_id) const =0
AShooterPlayerController * FindControllerFromCharacter(AShooterCharacter *character) const
Finds player controller from the given player character.
static APrimalDinoCharacter * GetRidingDino(AShooterPlayerController *player_controller)
Returns the dino the character is riding.
static FString GetIPAddress(AShooterPlayerController *player_controller)
Returns IP address of player.
AShooterPlayerController * FindPlayerFromSteamId(uint64 steam_id) const
Finds player from the given steam id.
virtual ServerStatus GetStatus() const =0
Returns the current server status.
void SendServerMessage(AShooterPlayerController *player_controller, FLinearColor msg_color, const T *msg, Args &&... args)
Sends server message to the specific player. Using fmt::format.
static std::optional< FString > TeleportToPlayer(AShooterPlayerController *me, AShooterPlayerController *him, bool check_for_dino, float max_dist)
Teleport one player to another.
static int GetInventoryItemCount(AShooterPlayerController *player_controller, const FString &item_name)
Counts a specific items quantity.
void SendChatMessage(AShooterPlayerController *player_controller, const FString &sender_name, const T *msg, Args &&... args)
Sends chat message to the specific player. Using fmt::format.
FString Replace(const TCHAR *From, const TCHAR *To, ESearchCase::Type SearchCase=ESearchCase::IgnoreCase) const
FORCEINLINE bool FindChar(TCHAR InChar, int32 &Index) const
FORCEINLINE FString Mid(int32 Start, int32 Count=INT_MAX) const
FORCEINLINE friend bool operator==(const FString &Lhs, const FString &Rhs)
FORCEINLINE bool FindLastChar(TCHAR InChar, int32 &Index) const
FORCEINLINE FString(const CharType *Src, typename TEnableIf< TIsCharType< CharType >::Value >::Type *Dummy=nullptr)
FORCEINLINE friend FString operator+(const TCHAR *Lhs, FString &&Rhs)
bool StartsWith(const FString &InPrefix, ESearchCase::Type SearchCase=ESearchCase::IgnoreCase) const
FORCEINLINE bool Equals(const FString &Other, ESearchCase::Type SearchCase=ESearchCase::CaseSensitive) const
bool EndsWith(const TCHAR *InSuffix, ESearchCase::Type SearchCase=ESearchCase::IgnoreCase) const
FORCEINLINE bool IsEmpty() const
FORCEINLINE int32 Len() const
FORCEINLINE friend FString operator+(FString &&Lhs, const TCHAR *Rhs)
FORCEINLINE int32 Add(const ElementType &Item)
int32 Remove(const ElementType &Item)
FORCEINLINE ObjectType * Get() const
IApiUtils & GetApiUtils()
FVector & DefaultActorLocationField()
int & TargetingTeamField()
USceneComponent * RootComponentField()
APlayerState * PlayerStateField()
UCheatManager * CheatManagerField()
FString * GetPlayerNetworkAddress(FString *result)
FUniqueNetIdRepl & UniqueIdField()
FString & PlayerNameField()
bool TeleportTo(FVector *DestLocation, FRotator *DestRotation, bool bIsATest, bool bNoCheck)
UPrimalInventoryComponent * MyInventoryComponentField()
void DoNeuter_Implementation()
static UClass * GetPrivateStaticClass()
void TameDino(AShooterPlayerController *ForPC, bool bIgnoreMaxTameLimit, int OverrideTamingTeamID)
int & TamingTeamIDField()
FString & TamerStringField()
int & AbsoluteBaseLevelField()
UPrimalPlayerData * GetPlayerData()
APrimalDinoCharacter * GetRidingDino()
unsigned __int64 GetSteamIDForPlayerID(int playerDataID)
void AddPlayerID(int playerDataID, unsigned __int64 netUniqueID)
__int64 & LinkedPlayerIDField()
void SetPlayerPos(float X, float Y, float Z)
AActor * SpawnActor(FString *blueprintPath, float spawnDistance, float spawnYOffset, float ZOffset, bool bDoDeferBeginPlay)
AShooterCharacter * GetPlayerCharacter()
FString * GetPlayerName(FString *result)
void SetTribeTamingDinoSettings(APrimalDinoCharacter *aDinoChar)
FIntVector(FVector InVector)
static float UnwindRadians(float A)
static T InterpCircularOut(const T &A, const T &B, float Alpha)
static T InterpEaseInOut(const T &A, const T &B, float Alpha, float Exp)
static T InterpExpoInOut(const T &A, const T &B, float Alpha)
static FORCEINLINE double RoundToNegativeInfinity(double F)
static FORCEINLINE int32 RandRange(int32 Min, int32 Max)
static T BiLerp(const T &P00, const T &P10, const T &P01, const T &P11, const U &FracX, const U &FracY)
static T LerpStable(const T &A, const T &B, double Alpha)
static FORCEINLINE float RandRange(float InMin, float InMax)
static float UnwindDegrees(float A)
static FORCEINLINE float FastAsin(float Value)
static FORCEINLINE float RoundToNegativeInfinity(float F)
static float FindDeltaAngleRadians(float A1, float A2)
static U CubicCRSplineInterp(const U &P0, const U &P1, const U &P2, const U &P3, const float T0, const float T1, const float T2, const float T3, const float T)
static T InterpCircularInOut(const T &A, const T &B, float Alpha)
static float SmoothStep(float A, float B, float X)
static FORCEINLINE T Clamp(const T X, const T Min, const T Max)
static FORCEINLINE float RoundFromZero(float F)
static T CubicInterpSecondDerivative(const T &P0, const T &T0, const T &P1, const T &T1, const U &A)
static int32 LeastCommonMultiplier(int32 a, int32 b)
static FORCEINLINE T Square(const T A)
static T Lerp(const T &A, const T &B, const U &Alpha)
static FORCEINLINE T Max3(const T A, const T B, const T C)
static T InterpEaseOut(const T &A, const T &B, float Alpha, float Exp)
static FORCEINLINE T DivideAndRoundDown(T Dividend, T Divisor)
static FORCEINLINE float RoundToZero(float F)
static FORCEINLINE int32 RandHelper(int32 A)
static int32 GreatestCommonDivisor(int32 a, int32 b)
static T InterpSinOut(const T &A, const T &B, float Alpha)
static T InterpEaseIn(const T &A, const T &B, float Alpha, float Exp)
static FORCEINLINE float RoundToPositiveInfinity(float F)
static FORCEINLINE void PolarToCartesian(const float Rad, const float Ang, float &OutX, float &OutY)
static FORCEINLINE float FRandRange(float InMin, float InMax)
static float FindDeltaAngleDegrees(float A1, float A2)
static FORCEINLINE bool IsPowerOfTwo(T Value)
static FORCEINLINE auto RadiansToDegrees(T const &RadVal) -> decltype(RadVal *(180.f/PI))
static T InterpCircularIn(const T &A, const T &B, float Alpha)
static T InterpStep(const T &A, const T &B, float Alpha, int32 Steps)
static FORCEINLINE T DivideAndRoundUp(T Dividend, T Divisor)
static T InterpExpoOut(const T &A, const T &B, float Alpha)
static T CubicInterpDerivative(const T &P0, const T &T0, const T &P1, const T &T1, const U &A)
static T CubicInterp(const T &P0, const T &T0, const T &P1, const T &T1, const U &A)
static FORCEINLINE double RoundToPositiveInfinity(double F)
static FORCEINLINE void SinCos(float *ScalarSin, float *ScalarCos, float Value)
static FORCEINLINE T Min3(const T A, const T B, const T C)
static FORCEINLINE auto DegreesToRadians(T const &DegVal) -> decltype(DegVal *(PI/180.f))
static T LerpStable(const T &A, const T &B, float Alpha)
static T InterpExpoIn(const T &A, const T &B, float Alpha)
static FORCEINLINE double RoundToZero(double F)
static T InterpSinIn(const T &A, const T &B, float Alpha)
static FORCEINLINE double RoundFromZero(double F)
static T InterpSinInOut(const T &A, const T &B, float Alpha)
static FORCEINLINE bool RandBool()
unsigned __int64 & PlayerDataIDField()
FORCEINLINE FRotator(float InPitch, float InYaw, float InRoll)
TSharedPtr< FUniqueNetId > UniqueNetId
FORCEINLINE FVector operator+(float Bias) const
FORCEINLINE FVector operator*=(float Scale)
bool operator!=(const FVector &V) const
static float Triple(const FVector &X, const FVector &Y, const FVector &Z)
static bool Orthogonal(const FVector &Normal1, const FVector &Normal2, float OrthogonalCosineThreshold=THRESH_NORMALS_ARE_ORTHOGONAL)
static bool Parallel(const FVector &Normal1, const FVector &Normal2, float ParallelCosineThreshold=THRESH_NORMALS_ARE_PARALLEL)
FORCEINLINE FVector operator-(const FVector &V) const
FORCEINLINE FVector operator-=(const FVector &V)
FVector GetSafeNormal(float Tolerance=SMALL_NUMBER) const
static FVector VectorPlaneProject(const FVector &V, const FVector &PlaneNormal)
FVector operator/=(const FVector &V)
static bool PointsAreSame(const FVector &P, const FVector &Q)
FORCEINLINE FVector(float InF)
FORCEINLINE FVector operator+=(const FVector &V)
FORCEINLINE FVector operator-() const
FORCEINLINE FVector operator^(const FVector &V) const
bool IsUniform(float Tolerance=KINDA_SMALL_NUMBER) const
FORCEINLINE FVector operator-(float Bias) const
FRotator ToOrientationRotator() const
FVector(const FLinearColor &InColor)
FVector MirrorByVector(const FVector &MirrorNormal) const
FVector Reciprocal() const
static FORCEINLINE float DistSquaredXY(const FVector &V1, const FVector &V2)
static bool PointsAreNear(const FVector &Point1, const FVector &Point2, float Dist)
bool InitFromString(const FString &InSourceString)
static FORCEINLINE float DotProduct(const FVector &A, const FVector &B)
FVector ComponentMax(const FVector &Other) const
void ToDirectionAndLength(FVector &OutDir, float &OutLength) const
FORCEINLINE float operator|(const FVector &V) const
FRotator Rotation() const
FORCEINLINE FVector GetUnsafeNormal() const
FVector GetClampedToMaxSize(float MaxSize) const
FORCEINLINE FVector operator*(const FVector &V) const
void FindBestAxisVectors(FVector &Axis1, FVector &Axis2) const
FVector(FIntVector InVector)
static const FVector ZeroVector
float SizeSquared2D() const
FVector GetSafeNormal2D(float Tolerance=SMALL_NUMBER) const
float & Component(int32 Index)
static FORCEINLINE float BoxPushOut(const FVector &Normal, const FVector &Size)
FVector operator/(float Scale) const
static FVector RadiansToDegrees(const FVector &RadVector)
FVector2D UnitCartesianToSpherical() const
static float PointPlaneDist(const FVector &Point, const FVector &PlaneBase, const FVector &PlaneNormal)
FVector BoundToCube(float Radius) const
static FORCEINLINE float DistSquared(const FVector &V1, const FVector &V2)
FORCEINLINE FVector GetSignVector() const
FORCEINLINE FVector operator/(const FVector &V) const
static FORCEINLINE float Dist2D(const FVector &V1, const FVector &V2)
FVector ComponentMin(const FVector &Other) const
float & operator[](int32 Index)
static FORCEINLINE float Dist(const FVector &V1, const FVector &V2)
FVector GridSnap(const float &GridSz) const
static bool Coincident(const FVector &Normal1, const FVector &Normal2, float ParallelCosineThreshold=THRESH_NORMALS_ARE_PARALLEL)
FVector Projection() const
static bool Coplanar(const FVector &Base1, const FVector &Normal1, const FVector &Base2, const FVector &Normal2, float ParallelCosineThreshold=THRESH_NORMALS_ARE_PARALLEL)
FORCEINLINE FVector ProjectOnTo(const FVector &A) const
static FVector PointPlaneProject(const FVector &Point, const FVector &PlaneBase, const FVector &PlaneNormal)
bool IsNormalized() const
FORCEINLINE FVector ProjectOnToNormal(const FVector &Normal) const
static FVector PointPlaneProject(const FVector &Point, const FVector &A, const FVector &B, const FVector &C)
bool Equals(const FVector &V, float Tolerance=KINDA_SMALL_NUMBER) const
FQuat ToOrientationQuat() const
bool operator==(const FVector &V) const
FVector GetClampedToSize2D(float Min, float Max) const
float SizeSquared() const
float operator[](int32 Index) const
FVector GetClampedToSize(float Min, float Max) const
static FORCEINLINE float DistSquared2D(const FVector &V1, const FVector &V2)
FVector operator/=(float V)
static FORCEINLINE FVector CrossProduct(const FVector &A, const FVector &B)
FVector operator*=(const FVector &V)
void Set(float InX, float InY, float InZ)
FORCEINLINE FVector operator+(const FVector &V) const
FORCEINLINE FVector operator*(float Scale) const
static FVector DegreesToRadians(const FVector &DegVector)
FORCEINLINE CONSTEXPR FVector(float InX, float InY, float InZ)
FORCEINLINE float CosineAngle2D(FVector B) const
bool AllComponentsEqual(float Tolerance=KINDA_SMALL_NUMBER) const
FVector GetClampedToMaxSize2D(float MaxSize) const
static FORCEINLINE float DistXY(const FVector &V1, const FVector &V2)
static void CreateOrthonormalBasis(FVector &XAxis, FVector &YAxis, FVector &ZAxis)
FORCEINLINE bool IsUnit(float LengthSquaredTolerance=KINDA_SMALL_NUMBER) const
FVector RotateAngleAxis(const float AngleDeg, const FVector &Axis) const
float HeadingAngle() const
static float EvaluateBezier(const FVector *ControlPoints, int32 NumPoints, TArray< FVector > &OutPoints)
float Component(int32 Index) const
FORCEINLINE FVector(const FVector2D V, float InZ)
bool IsNearlyZero(float Tolerance=KINDA_SMALL_NUMBER) const
FORCEINLINE FVector(EForceInit)
static FORCEINLINE float Distance(const FVector &V1, const FVector &V2)
bool Normalize(float Tolerance=SMALL_NUMBER)
T * Get(bool bEvenIfPendingKill=false)
FORCEINLINE T * operator->()
UObject * GetDefaultObject(bool bCreateIfNeeded)
FString * GetFullName(FString *result, UObject *StopOuter)
bool IsA(UClass *SomeBase)
UPrimalGameData * PrimalGameDataOverrideField()
UPrimalGameData * PrimalGameDataField()
FPrimalPlayerDataStruct * MyDataField()
FVector * GetWorldLocation(FVector *result)
static TArray< AActor * > * ServerOctreeOverlapActors(TArray< AActor * > *result, UWorld *theWorld, FVector AtLoc, float Radius, EServerOctreeGroup::Type OctreeType, bool bForceActorLocationDistanceCheck)
TArray< TAutoWeakObjectPtr< APlayerController > > & PlayerControllerListField()
APlayerController * GetFirstPlayerController()
AGameState * GameStateField()