Ark Server API (ASE) - Wiki
Loading...
Searching...
No Matches
FVector_NetQuantize Struct Reference

#include <NetSerialization.h>

+ Inheritance diagram for FVector_NetQuantize:
+ Collaboration diagram for FVector_NetQuantize:

Public Member Functions

FORCEINLINE FVector_NetQuantize ()
 
FORCEINLINE FVector_NetQuantize (EForceInit E)
 
FORCEINLINE FVector_NetQuantize (float InX, float InY, float InZ)
 
FORCEINLINE FVector_NetQuantize (const FVector &InVec)
 
- Public Member Functions inherited from FVector
FORCEINLINE FVector ()
 
FORCEINLINE FVector (float InF)
 
FORCEINLINE CONSTEXPR FVector (float InX, float InY, float InZ)
 
FORCEINLINE FVector (const FVector2D V, float InZ)
 
 FVector (const FLinearColor &InColor)
 
 FVector (FIntVector InVector)
 
 FVector (FIntPoint A)
 
FORCEINLINE FVector (EForceInit)
 
FORCEINLINE FVector operator^ (const FVector &V) const
 
FORCEINLINE float operator| (const FVector &V) const
 
FORCEINLINE FVector operator+ (const FVector &V) const
 
FORCEINLINE FVector operator- (const FVector &V) const
 
FORCEINLINE FVector operator- (float Bias) const
 
FORCEINLINE FVector operator+ (float Bias) const
 
FORCEINLINE FVector operator* (float Scale) const
 
FVector operator/ (float Scale) const
 
FORCEINLINE FVector operator* (const FVector &V) const
 
FORCEINLINE FVector operator/ (const FVector &V) const
 
bool operator== (const FVector &V) const
 
bool operator!= (const FVector &V) const
 
bool Equals (const FVector &V, float Tolerance=KINDA_SMALL_NUMBER) const
 
bool AllComponentsEqual (float Tolerance=KINDA_SMALL_NUMBER) const
 
FORCEINLINE FVector operator- () const
 
FORCEINLINE FVector operator+= (const FVector &V)
 
FORCEINLINE FVector operator-= (const FVector &V)
 
FORCEINLINE FVector operator*= (float Scale)
 
FVector operator/= (float V)
 
FVector operator*= (const FVector &V)
 
FVector operator/= (const FVector &V)
 
float & operator[] (int32 Index)
 
float operator[] (int32 Index) const
 
float & Component (int32 Index)
 
float Component (int32 Index) const
 
void Set (float InX, float InY, float InZ)
 
float GetMax () const
 
float GetAbsMax () const
 
float GetMin () const
 
float GetAbsMin () const
 
FVector ComponentMin (const FVector &Other) const
 
FVector ComponentMax (const FVector &Other) const
 
FVector GetAbs () const
 
float Size () const
 
float SizeSquared () const
 
float Size2D () const
 
float SizeSquared2D () const
 
bool IsNearlyZero (float Tolerance=KINDA_SMALL_NUMBER) const
 
bool IsZero () const
 
bool Normalize (float Tolerance=SMALL_NUMBER)
 
bool IsNormalized () const
 
void ToDirectionAndLength (FVector &OutDir, float &OutLength) const
 
FORCEINLINE FVector GetSignVector () const
 
FVector Projection () const
 
FORCEINLINE FVector GetUnsafeNormal () const
 
FVector GridSnap (const float &GridSz) const
 
FVector BoundToCube (float Radius) const
 
FVector GetClampedToSize (float Min, float Max) const
 
FVector GetClampedToSize2D (float Min, float Max) const
 
FVector GetClampedToMaxSize (float MaxSize) const
 
FVector GetClampedToMaxSize2D (float MaxSize) const
 
FVector Reciprocal () const
 
bool IsUniform (float Tolerance=KINDA_SMALL_NUMBER) const
 
FVector MirrorByVector (const FVector &MirrorNormal) const
 
FVector RotateAngleAxis (const float AngleDeg, const FVector &Axis) const
 
FVector GetSafeNormal (float Tolerance=SMALL_NUMBER) const
 
FVector GetSafeNormal2D (float Tolerance=SMALL_NUMBER) const
 
FORCEINLINE float CosineAngle2D (FVector B) const
 
FORCEINLINE FVector ProjectOnTo (const FVector &A) const
 
FORCEINLINE FVector ProjectOnToNormal (const FVector &Normal) const
 
FRotator ToOrientationRotator () const
 
FQuat ToOrientationQuat () const
 
FRotator Rotation () const
 
void FindBestAxisVectors (FVector &Axis1, FVector &Axis2) const
 
void UnwindEuler ()
 
bool ContainsNaN () const
 
FORCEINLINE bool IsUnit (float LengthSquaredTolerance=KINDA_SMALL_NUMBER) const
 
FString ToString () const
 
bool InitFromString (const FString &InSourceString)
 
FVector2D UnitCartesianToSpherical () const
 
float HeadingAngle () const
 

Additional Inherited Members

- Static Public Member Functions inherited from FVector
static FORCEINLINE FVector CrossProduct (const FVector &A, const FVector &B)
 
static FORCEINLINE float DotProduct (const FVector &A, const FVector &B)
 
static void CreateOrthonormalBasis (FVector &XAxis, FVector &YAxis, FVector &ZAxis)
 
static bool PointsAreSame (const FVector &P, const FVector &Q)
 
static bool PointsAreNear (const FVector &Point1, const FVector &Point2, float Dist)
 
static float PointPlaneDist (const FVector &Point, const FVector &PlaneBase, const FVector &PlaneNormal)
 
static FVector PointPlaneProject (const FVector &Point, const FVector &A, const FVector &B, const FVector &C)
 
static FVector PointPlaneProject (const FVector &Point, const FVector &PlaneBase, const FVector &PlaneNormal)
 
static FVector VectorPlaneProject (const FVector &V, const FVector &PlaneNormal)
 
static FORCEINLINE float Dist (const FVector &V1, const FVector &V2)
 
static FORCEINLINE float Distance (const FVector &V1, const FVector &V2)
 
static FORCEINLINE float DistXY (const FVector &V1, const FVector &V2)
 
static FORCEINLINE float Dist2D (const FVector &V1, const FVector &V2)
 
static FORCEINLINE float DistSquared (const FVector &V1, const FVector &V2)
 
static FORCEINLINE float DistSquaredXY (const FVector &V1, const FVector &V2)
 
static FORCEINLINE float DistSquared2D (const FVector &V1, const FVector &V2)
 
static FORCEINLINE float BoxPushOut (const FVector &Normal, const FVector &Size)
 
static bool Parallel (const FVector &Normal1, const FVector &Normal2, float ParallelCosineThreshold=THRESH_NORMALS_ARE_PARALLEL)
 
static bool Coincident (const FVector &Normal1, const FVector &Normal2, float ParallelCosineThreshold=THRESH_NORMALS_ARE_PARALLEL)
 
static bool Orthogonal (const FVector &Normal1, const FVector &Normal2, float OrthogonalCosineThreshold=THRESH_NORMALS_ARE_ORTHOGONAL)
 
static bool Coplanar (const FVector &Base1, const FVector &Normal1, const FVector &Base2, const FVector &Normal2, float ParallelCosineThreshold=THRESH_NORMALS_ARE_PARALLEL)
 
static float Triple (const FVector &X, const FVector &Y, const FVector &Z)
 
static float EvaluateBezier (const FVector *ControlPoints, int32 NumPoints, TArray< FVector > &OutPoints)
 
static FVector RadiansToDegrees (const FVector &RadVector)
 
static FVector DegreesToRadians (const FVector &DegVector)
 
- Public Attributes inherited from FVector
float X
 
float Y
 
float Z
 
- Static Public Attributes inherited from FVector
static const FVector ZeroVector
 

Detailed Description

===================== Vector NetSerialization customization. ===================== Provides custom NetSerilization for FVectors.

There are two types of net quantization available:

Fixed Quantization (SerializeFixedVector) -Fixed number of bits -Max Value specified as template parameter

Serialized value is scaled based on num bits and max value. Precision is determined by MaxValue and NumBits (if 2^NumBits is > MaxValue, you will have room for extra precision).

This format is good for things like normals, where the magnitudes are often similar. For example normal values may often be in the 0.1f - 1.f range. In a packed format, the overhead in serializing num of bits per component would outweigh savings from serializing very small ( < 0.1f ) values.

It is also good for performance critical sections since you can guarantee byte alignment if that is important.

Packed Quantization (SerializePackedVector) -Scaling factor (usually 10, 100, etc) -Max number of bits per component (this is maximum, not a constant)

The format is <num of bits per component> <N bits for X> <N bits for Y> <N bits for Z>

The advantages to this format are that packed nature. You may support large magnitudes and have as much precision as you want. All while having small magnitudes take less space.

The trade off is that there is overhead in serializing how many bits are used for each component, and byte alignment is almost always thrown off.

Definition at line 52 of file NetSerialization.h.

Constructor & Destructor Documentation

◆ FVector_NetQuantize() [1/4]

FORCEINLINE FVector_NetQuantize::FVector_NetQuantize ( )
inline

Definition at line 54 of file NetSerialization.h.

◆ FVector_NetQuantize() [2/4]

FORCEINLINE FVector_NetQuantize::FVector_NetQuantize ( EForceInit E)
inlineexplicit

Definition at line 57 of file NetSerialization.h.

+ Here is the call graph for this function:

◆ FVector_NetQuantize() [3/4]

FORCEINLINE FVector_NetQuantize::FVector_NetQuantize ( float InX,
float InY,
float InZ )
inline

Definition at line 61 of file NetSerialization.h.

+ Here is the call graph for this function:

◆ FVector_NetQuantize() [4/4]

FORCEINLINE FVector_NetQuantize::FVector_NetQuantize ( const FVector & InVec)
inline

Definition at line 65 of file NetSerialization.h.


The documentation for this struct was generated from the following file: