G1R AngelScript
Scripting reference for the Gothic 1 Remake
Loading...
Searching...
No Matches
FVector3f Struct Reference

A point or direction FVector in 3d space. @note The full C++ class is located here: Engine\Source\Runtime\Core\Public\Math\Vector.h. More...

Public Member Functions

Functions
FVector3f BoundToCube (float32 Radius) const
FVector3f opAdd (FVector3f Other) const
FVector3f opSub (FVector3f Other) const
FVector3f opMul (FVector3f Other) const
FVector3f opDiv (FVector3f Other) const
FVector3f opMul (float32 Scale) const
FVector3f opDiv (float32 Scale) const
FVector3f opNeg () const
FVector3f opMulAssign (float32 Scale)
FVector3f opDivAssign (float32 Scale)
FVector3f opMulAssign (FVector3f Other)
FVector3f opDivAssign (FVector3f Other)
FVector3f opAddAssign (FVector3f Other)
FVector3f opSubAssign (FVector3f Other)
float32 & opIndex (int Index)
float32 opIndex (int Index) const
bool opEquals (FVector3f Other) const
bool Equals (FVector3f Other, float32 Tolerance=__KINDA_SMALL_NUMBER_flt) const
FVector3f CrossProduct (FVector3f Other) const
float32 DotProduct (FVector3f Other) const
bool AllComponentsEqual (float32 Tolerance=__KINDA_SMALL_NUMBER_flt) const
bool Parallel (FVector3f Normal2, float32 ParallelCosineThreshold=__THRESH_NORMALS_ARE_PARALLEL_flt) const
 See if two normal vectors are nearly parallel, meaning the angle between them is close to 0 degrees.
bool Coincident (FVector3f Normal2, float32 ParallelCosineThreshold=__THRESH_NORMALS_ARE_PARALLEL_flt) const
 See if two normal vectors are coincident (nearly parallel and point in the same direction).
bool Orthogonal (FVector3f Normal2, float32 OrthogonalCosineThreshold=__THRESH_NORMALS_ARE_ORTHOGONAL_flt) const
 See if two normal vectors are nearly orthogonal (perpendicular), meaning the angle between them is close to 90 degrees.
float32 GetMax () const
float32 GetAbsMax () const
float32 GetMin () const
float32 GetAbsMin () const
FVector3f ComponentMin (FVector3f Other) const
FVector3f ComponentMax (FVector3f Other) const
FVector3f ComponentClamp (FVector3f Min, FVector3f Max) const
FVector3f GetAbs () const
float32 Size () const
float32 SizeSquared () const
float32 Size2D () const
float32 SizeSquared2D () const
bool IsNearlyZero (float32 Tolerance=__KINDA_SMALL_NUMBER_flt) const
bool IsZero () const
bool Normalize (float32 Tolerance=__SMALL_NUMBER_flt)
bool IsNormalized () const
void ToDirectionAndLength (FVector3f &OutDir, float32 &OutLength) const
FVector3f GetSignVector () const
FVector3f Projection () const
FVector3f GetUnsafeNormal () const
FVector3f GridSnap (const float32 &GridSize) const
FVector3f & opAssign (FVector3f Other)
FVector3f BoundToBox (FVector3f Min, FVector3f Max) const
FVector3f GetClampedToSize (float32 Min, float32 Max) const
FVector3f GetClampedToSize2D (float32 Min, float32 Max) const
FVector3f GetClampedToMaxSize (float32 Max) const
FVector3f GetClampedToMaxSize2D (float32 Max) const
void AddBounded (FVector3f V, float32 Radius=MAX_int16) const
FVector3f Reciprocal () const
bool IsUniform (float32 Tolerance=KINDA_SMALL_NUMBER) const
FVector3f MirrorByVector (FVector3f MirrorNormal) const
FVector3f VectorPlaneProject (FVector3f PlaneNormal) const
FVector3f RotateAngleAxis (float32 AngleDeg, FVector3f Axis) const
FVector3f GetSafeNormal (float32 Tolerance=__SMALL_NUMBER_flt, FVector3f ResultIfZero=FVector3f ::ZeroVector) const
FVector3f GetSafeNormal2D (float32 Tolerance=__SMALL_NUMBER_flt, FVector3f ResultIfZero=FVector3f ::ZeroVector) const
float32 CosineAngle2D (FVector3f B) const
FVector3f ProjectOnTo (FVector3f A) const
 Gets a copy of this vector projected onto the input vector.
FVector3f ProjectOnToNormal (FVector3f Normal) const
 Gets a copy of this vector projected onto the input vector, which is assumed to be unit length.
void FindBestAxisVectors (FVector3f &Axis1, FVector3f &Axis2) const
void UnwindEuler () const
bool ContainsNaN () const
bool IsUnit (float32 LengthSquaredTolerance=__KINDA_SMALL_NUMBER_flt) const
float32 HeadingAngle () const
bool PointsAreSame (FVector3f P2) const
bool PointsAreNear (FVector3f P2, float32 Dist) const
float32 Distance (FVector3f Other) const
float32 DistSquared (FVector3f Other) const
float32 Dist2D (FVector3f Other) const
float32 DistXY (FVector3f Other) const
float32 DistSquaredXY (FVector3f Other) const
float32 DistSquared2D (FVector3f Other) const
FRotator3f ToOrientationRotator () const
FQuat4f ToOrientationQuat () const
FRotator3f Rotation () const
bool InitFromString (FString SourceString)
FString ToString () const
float32 AngularDistance (FVector3f B) const
 Get the angle in radians between two vectors. Vectors are not assumed to be normalized.
float32 AngularDistanceForNormals (FVector3f B) const
 Get the angle in radians between two normal vectors. Both vectors are assumed to be unit length, or a wrong value will be returned.
FVector3f ConstrainToDirection (FVector3f Direction) const
FVector3f ConstrainToPlane (FVector3f PlaneUp) const
float32 Dist2D (FVector3f Other, FVector3f UpDirection) const
float32 DistSquared2D (FVector3f Other, FVector3f UpDirection) const
FVector3f PointPlaneProject (FVector3f PlaneBase, FVector3f PlaneNormal) const
float32 Size2D (FVector3f UpDirection) const
float32 SizeSquared2D (FVector3f UpDirection) const
FString ToColorString () const

Public Attributes

Vector
float32 Y
float32 Z
float32 X
Variables
const float32 AbsMax
const float32 Min
const float32 AbsMin
const float32 Max
const FVector3f Abs
const FVector3f SignVector
const FVector3f UnsafeNormal

Static Public Attributes

Static Variables
static const FVector3f OneVector
static const FVector3f UpVector
static const FVector3f ForwardVector
static const FVector3f RightVector
static const FVector3f ZeroVector

Detailed Description

A point or direction FVector in 3d space. @note The full C++ class is located here: Engine\Source\Runtime\Core\Public\Math\Vector.h.

Member Function Documentation

◆ AddBounded()

void AddBounded ( FVector3f V,
float32 Radius = MAX_int16 ) const

◆ AllComponentsEqual()

bool AllComponentsEqual ( float32 Tolerance = __KINDA_SMALL_NUMBER_flt) const

◆ AngularDistance()

float32 AngularDistance ( FVector3f B) const

Get the angle in radians between two vectors. Vectors are not assumed to be normalized.

◆ AngularDistanceForNormals()

float32 AngularDistanceForNormals ( FVector3f B) const

Get the angle in radians between two normal vectors. Both vectors are assumed to be unit length, or a wrong value will be returned.

◆ BoundToBox()

FVector3f BoundToBox ( FVector3f Min,
FVector3f Max ) const

◆ BoundToCube()

FVector3f BoundToCube ( float32 Radius) const

◆ Coincident()

bool Coincident ( FVector3f Normal2,
float32 ParallelCosineThreshold = __THRESH_NORMALS_ARE_PARALLEL_flt ) const

See if two normal vectors are coincident (nearly parallel and point in the same direction).

@param Normal2   Second normalized vector. *
@param ParallelCosineThreshold   Normals are coincident if dot product (cosine of angle between them) is greater than or equal to this. For example: cos(1.0 degrees). *
@return    true if vectors are coincident (nearly parallel and point in the same direction), false otherwise. 

◆ ComponentClamp()

FVector3f ComponentClamp ( FVector3f Min,
FVector3f Max ) const

◆ ComponentMax()

FVector3f ComponentMax ( FVector3f Other) const

◆ ComponentMin()

FVector3f ComponentMin ( FVector3f Other) const

◆ ConstrainToDirection()

FVector3f ConstrainToDirection ( FVector3f Direction) const

◆ ConstrainToPlane()

FVector3f ConstrainToPlane ( FVector3f PlaneUp) const

◆ ContainsNaN()

bool ContainsNaN ( ) const

◆ CosineAngle2D()

float32 CosineAngle2D ( FVector3f B) const

◆ CrossProduct()

FVector3f CrossProduct ( FVector3f Other) const

◆ Dist2D() [1/2]

float32 Dist2D ( FVector3f Other) const

◆ Dist2D() [2/2]

float32 Dist2D ( FVector3f Other,
FVector3f UpDirection ) const

◆ Distance()

float32 Distance ( FVector3f Other) const

◆ DistSquared()

float32 DistSquared ( FVector3f Other) const

◆ DistSquared2D() [1/2]

float32 DistSquared2D ( FVector3f Other) const

◆ DistSquared2D() [2/2]

float32 DistSquared2D ( FVector3f Other,
FVector3f UpDirection ) const

◆ DistSquaredXY()

float32 DistSquaredXY ( FVector3f Other) const

◆ DistXY()

float32 DistXY ( FVector3f Other) const

◆ DotProduct()

float32 DotProduct ( FVector3f Other) const

◆ Equals()

bool Equals ( FVector3f Other,
float32 Tolerance = __KINDA_SMALL_NUMBER_flt ) const

◆ FindBestAxisVectors()

void FindBestAxisVectors ( FVector3f & Axis1,
FVector3f & Axis2 ) const

◆ GetAbs()

FVector3f GetAbs ( ) const

◆ GetAbsMax()

float32 GetAbsMax ( ) const

◆ GetAbsMin()

float32 GetAbsMin ( ) const

◆ GetClampedToMaxSize()

FVector3f GetClampedToMaxSize ( float32 Max) const

◆ GetClampedToMaxSize2D()

FVector3f GetClampedToMaxSize2D ( float32 Max) const

◆ GetClampedToSize()

FVector3f GetClampedToSize ( float32 Min,
float32 Max ) const

◆ GetClampedToSize2D()

FVector3f GetClampedToSize2D ( float32 Min,
float32 Max ) const

◆ GetMax()

float32 GetMax ( ) const

◆ GetMin()

float32 GetMin ( ) const

◆ GetSafeNormal()

FVector3f GetSafeNormal ( float32 Tolerance = __SMALL_NUMBER_flt,
FVector3f ResultIfZero = FVector3f :: ZeroVector ) const

◆ GetSafeNormal2D()

FVector3f GetSafeNormal2D ( float32 Tolerance = __SMALL_NUMBER_flt,
FVector3f ResultIfZero = FVector3f :: ZeroVector ) const

◆ GetSignVector()

FVector3f GetSignVector ( ) const

◆ GetUnsafeNormal()

FVector3f GetUnsafeNormal ( ) const

◆ GridSnap()

FVector3f GridSnap ( const float32 & GridSize) const

◆ HeadingAngle()

float32 HeadingAngle ( ) const

◆ InitFromString()

bool InitFromString ( FString SourceString)

◆ IsNearlyZero()

bool IsNearlyZero ( float32 Tolerance = __KINDA_SMALL_NUMBER_flt) const

◆ IsNormalized()

bool IsNormalized ( ) const

◆ IsUniform()

bool IsUniform ( float32 Tolerance = KINDA_SMALL_NUMBER) const

◆ IsUnit()

bool IsUnit ( float32 LengthSquaredTolerance = __KINDA_SMALL_NUMBER_flt) const

◆ IsZero()

bool IsZero ( ) const

◆ MirrorByVector()

FVector3f MirrorByVector ( FVector3f MirrorNormal) const

◆ Normalize()

bool Normalize ( float32 Tolerance = __SMALL_NUMBER_flt)

◆ opAdd()

FVector3f opAdd ( FVector3f Other) const

◆ opAddAssign()

FVector3f opAddAssign ( FVector3f Other)

◆ opAssign()

FVector3f & opAssign ( FVector3f Other)

◆ opDiv() [1/2]

FVector3f opDiv ( float32 Scale) const

◆ opDiv() [2/2]

FVector3f opDiv ( FVector3f Other) const

◆ opDivAssign() [1/2]

FVector3f opDivAssign ( float32 Scale)

◆ opDivAssign() [2/2]

FVector3f opDivAssign ( FVector3f Other)

◆ opEquals()

bool opEquals ( FVector3f Other) const

◆ opIndex() [1/2]

float32 & opIndex ( int Index)

◆ opIndex() [2/2]

float32 opIndex ( int Index) const

◆ opMul() [1/2]

FVector3f opMul ( float32 Scale) const

◆ opMul() [2/2]

FVector3f opMul ( FVector3f Other) const

◆ opMulAssign() [1/2]

FVector3f opMulAssign ( float32 Scale)

◆ opMulAssign() [2/2]

FVector3f opMulAssign ( FVector3f Other)

◆ opNeg()

FVector3f opNeg ( ) const

◆ opSub()

FVector3f opSub ( FVector3f Other) const

◆ opSubAssign()

FVector3f opSubAssign ( FVector3f Other)

◆ Orthogonal()

bool Orthogonal ( FVector3f Normal2,
float32 OrthogonalCosineThreshold = __THRESH_NORMALS_ARE_ORTHOGONAL_flt ) const

See if two normal vectors are nearly orthogonal (perpendicular), meaning the angle between them is close to 90 degrees.

@param Normal2   Second normalized vector. *
@param OrthogonalCosineThreshold   Normals are orthogonal if absolute value of dot product (cosine of angle between them) is less than or equal to this. For example: cos(89.0 degrees). *
@return    true if vectors are orthogonal (perpendicular), false otherwise. 

◆ Parallel()

bool Parallel ( FVector3f Normal2,
float32 ParallelCosineThreshold = __THRESH_NORMALS_ARE_PARALLEL_flt ) const

See if two normal vectors are nearly parallel, meaning the angle between them is close to 0 degrees.

@param ParallelCosineThreshold   Normals are parallel if absolute value of dot product (cosine of angle between them) is greater than or equal to this. For example: cos(1.0 degrees).  *
@return    true if vectors are nearly parallel, false otherwise. 

◆ PointPlaneProject()

FVector3f PointPlaneProject ( FVector3f PlaneBase,
FVector3f PlaneNormal ) const

◆ PointsAreNear()

bool PointsAreNear ( FVector3f P2,
float32 Dist ) const

◆ PointsAreSame()

bool PointsAreSame ( FVector3f P2) const

◆ Projection()

FVector3f Projection ( ) const

◆ ProjectOnTo()

FVector3f ProjectOnTo ( FVector3f A) const

Gets a copy of this vector projected onto the input vector.

Parameters
AVector to project onto, does not assume it is normalized.
Returns
Projected vector.

◆ ProjectOnToNormal()

FVector3f ProjectOnToNormal ( FVector3f Normal) const

Gets a copy of this vector projected onto the input vector, which is assumed to be unit length.

Returns
Projected vector.

◆ Reciprocal()

FVector3f Reciprocal ( ) const

◆ RotateAngleAxis()

FVector3f RotateAngleAxis ( float32 AngleDeg,
FVector3f Axis ) const

◆ Rotation()

FRotator3f Rotation ( ) const

◆ Size()

float32 Size ( ) const

◆ Size2D() [1/2]

float32 Size2D ( ) const

◆ Size2D() [2/2]

float32 Size2D ( FVector3f UpDirection) const

◆ SizeSquared()

float32 SizeSquared ( ) const

◆ SizeSquared2D() [1/2]

float32 SizeSquared2D ( ) const

◆ SizeSquared2D() [2/2]

float32 SizeSquared2D ( FVector3f UpDirection) const

◆ ToColorString()

FString ToColorString ( ) const

◆ ToDirectionAndLength()

void ToDirectionAndLength ( FVector3f & OutDir,
float32 & OutLength ) const

◆ ToOrientationQuat()

FQuat4f ToOrientationQuat ( ) const

◆ ToOrientationRotator()

FRotator3f ToOrientationRotator ( ) const

◆ ToString()

FString ToString ( ) const

◆ UnwindEuler()

void UnwindEuler ( ) const

◆ VectorPlaneProject()

FVector3f VectorPlaneProject ( FVector3f PlaneNormal) const

Member Data Documentation

◆ Abs

const FVector3f Abs

◆ AbsMax

const float32 AbsMax

◆ AbsMin

const float32 AbsMin

◆ ForwardVector

const FVector3f ForwardVector
static

◆ Max

const float32 Max

◆ Min

const float32 Min

◆ OneVector

const FVector3f OneVector
static

◆ RightVector

const FVector3f RightVector
static

◆ SignVector

const FVector3f SignVector

◆ UnsafeNormal

const FVector3f UnsafeNormal

◆ UpVector

const FVector3f UpVector
static

◆ X

float32 X

◆ Y

float32 Y

◆ Z

float32 Z

◆ ZeroVector

const FVector3f ZeroVector
static