G1R AngelScript
Scripting reference for the Gothic 1 Remake
Loading...
Searching...
No Matches
FVector 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
FVector BoundToCube (float Radius) const
FVector opAdd (FVector Other) const
FVector opSub (FVector Other) const
FVector opMul (FVector Other) const
FVector opDiv (FVector Other) const
FVector opMul (float Scale) const
FVector opDiv (float Scale) const
FVector opNeg () const
FVector opMulAssign (float Scale)
FVector opDivAssign (float Scale)
FVector opMulAssign (FVector Other)
FVector opDivAssign (FVector Other)
FVector opAddAssign (FVector Other)
FVector opSubAssign (FVector Other)
float & opIndex (int Index)
float opIndex (int Index) const
bool opEquals (FVector Other) const
bool Equals (FVector Other, float Tolerance=KINDA_SMALL_NUMBER) const
FVector CrossProduct (FVector Other) const
float DotProduct (FVector Other) const
bool AllComponentsEqual (float Tolerance=KINDA_SMALL_NUMBER) const
bool Parallel (FVector Normal2, float ParallelCosineThreshold=THRESH_NORMALS_ARE_PARALLEL) const
 See if two normal vectors are nearly parallel, meaning the angle between them is close to 0 degrees.
bool Coincident (FVector Normal2, float ParallelCosineThreshold=THRESH_NORMALS_ARE_PARALLEL) const
 See if two normal vectors are coincident (nearly parallel and point in the same direction).
bool Orthogonal (FVector Normal2, float OrthogonalCosineThreshold=THRESH_NORMALS_ARE_ORTHOGONAL) const
 See if two normal vectors are nearly orthogonal (perpendicular), meaning the angle between them is close to 90 degrees.
float GetMax () const
float GetAbsMax () const
float GetMin () const
float GetAbsMin () const
FVector ComponentMin (FVector Other) const
FVector ComponentMax (FVector Other) const
FVector ComponentClamp (FVector Min, FVector Max) 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
void ToDirectionAndLength (FVector &OutDir, float32 &OutLength) const
FVector GetSignVector () const
FVector Projection () const
FVector GetUnsafeNormal () const
FVector GridSnap (const float &GridSize) const
FVector & opAssign (FVector Other)
FVector BoundToBox (FVector Min, FVector Max) const
FVector GetClampedToSize (float Min, float Max) const
FVector GetClampedToSize2D (float Min, float Max) const
FVector GetClampedToMaxSize (float Max) const
FVector GetClampedToMaxSize2D (float Max) const
void AddBounded (FVector V, float Radius=MAX_int16)
FVector Reciprocal () const
bool IsUniform (float Tolerance=KINDA_SMALL_NUMBER) const
FVector MirrorByVector (FVector MirrorNormal) const
FVector VectorPlaneProject (FVector PlaneNormal) const
FVector RotateAngleAxis (float AngleDeg, FVector Axis) const
FVector GetSafeNormal (float Tolerance=SMALL_NUMBER, FVector ResultIfZero=FVector ::ZeroVector) const
FVector GetSafeNormal2D (float Tolerance=SMALL_NUMBER, FVector ResultIfZero=FVector ::ZeroVector) const
float CosineAngle2D (FVector B) const
FVector ProjectOnTo (FVector A) const
 Gets a copy of this vector projected onto the input vector.
FVector ProjectOnToNormal (FVector Normal) const
 Gets a copy of this vector projected onto the input vector, which is assumed to be unit length.
void FindBestAxisVectors (FVector &Axis1, FVector &Axis2) const
void UnwindEuler () const
bool ContainsNaN () const
bool IsUnit (float LengthSquaredTolerance=KINDA_SMALL_NUMBER) const
float HeadingAngle () const
bool PointsAreSame (FVector P2) const
bool PointsAreNear (FVector P2, float Dist) const
float Distance (FVector Other) const
float DistSquared (FVector Other) const
float Dist2D (FVector Other) const
float DistXY (FVector Other) const
float DistSquaredXY (FVector Other) const
float DistSquared2D (FVector Other) const
FRotator ToOrientationRotator () const
FQuat ToOrientationQuat () const
FRotator Rotation () const
bool InitFromString (FString SourceString)
FString ToString () const
float AngularDistance (FVector B) const
 Get the angle in radians between two vectors. Vectors are not assumed to be normalized.
float AngularDistanceForNormals (FVector 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.
FVector ConstrainToDirection (FVector Direction) const
FVector ConstrainToPlane (FVector PlaneUp) const
float Dist2D (FVector Other, FVector UpDirection) const
float DistSquared2D (FVector Other, FVector UpDirection) const
FVector MoveTowards (FVector Target, float StepSize) const
FVector PointPlaneProject (FVector PlaneBase, FVector PlaneNormal) const
float Size2D (FVector UpDirection) const
float SizeSquared2D (FVector UpDirection) const
FString ToColorString () const

Public Attributes

Vector
float Y
float Z
float X
Variables
const float Max
const float AbsMax
const float Min
const float AbsMin
const FVector Abs
const FVector SignVector
const FVector UnsafeNormal

Static Public Attributes

Static Variables
static const FVector OneVector
static const FVector UpVector
static const FVector DownVector
static const FVector ForwardVector
static const FVector BackwardVector
static const FVector RightVector
static const FVector LeftVector
static const FVector 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 ( FVector V,
float Radius = MAX_int16 )

◆ AllComponentsEqual()

bool AllComponentsEqual ( float Tolerance = KINDA_SMALL_NUMBER) const

◆ AngularDistance()

float AngularDistance ( FVector B) const

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

◆ AngularDistanceForNormals()

float AngularDistanceForNormals ( FVector 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()

FVector BoundToBox ( FVector Min,
FVector Max ) const

◆ BoundToCube()

FVector BoundToCube ( float Radius) const

◆ Coincident()

bool Coincident ( FVector Normal2,
float ParallelCosineThreshold = THRESH_NORMALS_ARE_PARALLEL ) 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()

FVector ComponentClamp ( FVector Min,
FVector Max ) const

◆ ComponentMax()

FVector ComponentMax ( FVector Other) const

◆ ComponentMin()

FVector ComponentMin ( FVector Other) const

◆ ConstrainToDirection()

FVector ConstrainToDirection ( FVector Direction) const

◆ ConstrainToPlane()

FVector ConstrainToPlane ( FVector PlaneUp) const

◆ ContainsNaN()

bool ContainsNaN ( ) const

◆ CosineAngle2D()

float CosineAngle2D ( FVector B) const

◆ CrossProduct()

FVector CrossProduct ( FVector Other) const

◆ Dist2D() [1/2]

float Dist2D ( FVector Other) const

◆ Dist2D() [2/2]

float Dist2D ( FVector Other,
FVector UpDirection ) const

◆ Distance()

float Distance ( FVector Other) const

◆ DistSquared()

float DistSquared ( FVector Other) const

◆ DistSquared2D() [1/2]

float DistSquared2D ( FVector Other) const

◆ DistSquared2D() [2/2]

float DistSquared2D ( FVector Other,
FVector UpDirection ) const

◆ DistSquaredXY()

float DistSquaredXY ( FVector Other) const

◆ DistXY()

float DistXY ( FVector Other) const

◆ DotProduct()

float DotProduct ( FVector Other) const

◆ Equals()

bool Equals ( FVector Other,
float Tolerance = KINDA_SMALL_NUMBER ) const

◆ FindBestAxisVectors()

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

◆ GetAbs()

FVector GetAbs ( ) const

◆ GetAbsMax()

float GetAbsMax ( ) const

◆ GetAbsMin()

float GetAbsMin ( ) const

◆ GetClampedToMaxSize()

FVector GetClampedToMaxSize ( float Max) const

◆ GetClampedToMaxSize2D()

FVector GetClampedToMaxSize2D ( float Max) const

◆ GetClampedToSize()

FVector GetClampedToSize ( float Min,
float Max ) const

◆ GetClampedToSize2D()

FVector GetClampedToSize2D ( float Min,
float Max ) const

◆ GetMax()

float GetMax ( ) const

◆ GetMin()

float GetMin ( ) const

◆ GetSafeNormal()

FVector GetSafeNormal ( float Tolerance = SMALL_NUMBER,
FVector ResultIfZero = FVector :: ZeroVector ) const

◆ GetSafeNormal2D()

FVector GetSafeNormal2D ( float Tolerance = SMALL_NUMBER,
FVector ResultIfZero = FVector :: ZeroVector ) const

◆ GetSignVector()

FVector GetSignVector ( ) const

◆ GetUnsafeNormal()

FVector GetUnsafeNormal ( ) const

◆ GridSnap()

FVector GridSnap ( const float & GridSize) const

◆ HeadingAngle()

float HeadingAngle ( ) const

◆ InitFromString()

bool InitFromString ( FString SourceString)

◆ IsNearlyZero()

bool IsNearlyZero ( float Tolerance = KINDA_SMALL_NUMBER) const

◆ IsNormalized()

bool IsNormalized ( ) const

◆ IsUniform()

bool IsUniform ( float Tolerance = KINDA_SMALL_NUMBER) const

◆ IsUnit()

bool IsUnit ( float LengthSquaredTolerance = KINDA_SMALL_NUMBER) const

◆ IsZero()

bool IsZero ( ) const

◆ MirrorByVector()

FVector MirrorByVector ( FVector MirrorNormal) const

◆ MoveTowards()

FVector MoveTowards ( FVector Target,
float StepSize ) const

◆ Normalize()

bool Normalize ( float Tolerance = SMALL_NUMBER)

◆ opAdd()

FVector opAdd ( FVector Other) const

◆ opAddAssign()

FVector opAddAssign ( FVector Other)

◆ opAssign()

FVector & opAssign ( FVector Other)

◆ opDiv() [1/2]

FVector opDiv ( float Scale) const

◆ opDiv() [2/2]

FVector opDiv ( FVector Other) const

◆ opDivAssign() [1/2]

FVector opDivAssign ( float Scale)

◆ opDivAssign() [2/2]

FVector opDivAssign ( FVector Other)

◆ opEquals()

bool opEquals ( FVector Other) const

◆ opIndex() [1/2]

float & opIndex ( int Index)

◆ opIndex() [2/2]

float opIndex ( int Index) const

◆ opMul() [1/2]

FVector opMul ( float Scale) const

◆ opMul() [2/2]

FVector opMul ( FVector Other) const

◆ opMulAssign() [1/2]

FVector opMulAssign ( float Scale)

◆ opMulAssign() [2/2]

FVector opMulAssign ( FVector Other)

◆ opNeg()

FVector opNeg ( ) const

◆ opSub()

FVector opSub ( FVector Other) const

◆ opSubAssign()

FVector opSubAssign ( FVector Other)

◆ Orthogonal()

bool Orthogonal ( FVector Normal2,
float OrthogonalCosineThreshold = THRESH_NORMALS_ARE_ORTHOGONAL ) 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 ( FVector Normal2,
float ParallelCosineThreshold = THRESH_NORMALS_ARE_PARALLEL ) 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()

FVector PointPlaneProject ( FVector PlaneBase,
FVector PlaneNormal ) const

◆ PointsAreNear()

bool PointsAreNear ( FVector P2,
float Dist ) const

◆ PointsAreSame()

bool PointsAreSame ( FVector P2) const

◆ Projection()

FVector Projection ( ) const

◆ ProjectOnTo()

FVector ProjectOnTo ( FVector 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()

FVector ProjectOnToNormal ( FVector Normal) const

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

Returns
Projected vector.

◆ Reciprocal()

FVector Reciprocal ( ) const

◆ RotateAngleAxis()

FVector RotateAngleAxis ( float AngleDeg,
FVector Axis ) const

◆ Rotation()

FRotator Rotation ( ) const

◆ Size()

float Size ( ) const

◆ Size2D() [1/2]

float Size2D ( ) const

◆ Size2D() [2/2]

float Size2D ( FVector UpDirection) const

◆ SizeSquared()

float SizeSquared ( ) const

◆ SizeSquared2D() [1/2]

float SizeSquared2D ( ) const

◆ SizeSquared2D() [2/2]

float SizeSquared2D ( FVector UpDirection) const

◆ ToColorString()

FString ToColorString ( ) const

◆ ToDirectionAndLength() [1/2]

void ToDirectionAndLength ( FVector & OutDir,
float & OutLength ) const

◆ ToDirectionAndLength() [2/2]

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

◆ ToOrientationQuat()

FQuat ToOrientationQuat ( ) const

◆ ToOrientationRotator()

FRotator ToOrientationRotator ( ) const

◆ ToString()

FString ToString ( ) const

◆ UnwindEuler()

void UnwindEuler ( ) const

◆ VectorPlaneProject()

FVector VectorPlaneProject ( FVector PlaneNormal) const

Member Data Documentation

◆ Abs

const FVector Abs

◆ AbsMax

const float AbsMax

◆ AbsMin

const float AbsMin

◆ BackwardVector

const FVector BackwardVector
static

◆ DownVector

const FVector DownVector
static

◆ ForwardVector

const FVector ForwardVector
static

◆ LeftVector

const FVector LeftVector
static

◆ Max

const float Max

◆ Min

const float Min

◆ OneVector

const FVector OneVector
static

◆ RightVector

const FVector RightVector
static

◆ SignVector

const FVector SignVector

◆ UnsafeNormal

const FVector UnsafeNormal

◆ UpVector

const FVector UpVector
static

◆ X

float X

◆ Y

float Y

◆ Z

float Z

◆ ZeroVector

const FVector ZeroVector
static