FVector2

Templated 2D Vector.

Windows
MacOS
Linux

References

Module

GeometricObjects

Header

/Engine/Plugins/Experimental/GeometryProcessing/Source/GeometricObjects/Public/VectorTypes.h

Include

#include "VectorTypes.h"

Syntax

template<typename T>
struct FVector2

Remarks

Templated 2D Vector. Ported from g3Sharp library, with the intention of maintaining compatibility with existing g3Sharp code. Has an API similar to WildMagic, GTEngine, Eigen, etc.

Convenience typedefs for FVector2f/FVector2d/FVector2i are defined, and should be preferentially used over the base template type

Variables

Name Description

Public variable

T

 

X

Public variable

T

 

Y

Constructors

Name Description

Public function

FVector2()

Public function

FVector2

(
    const T* Data
)

Public function

FVector2

(
    const FVector2& Vec
)

Public function

FVector2

(
    const FVector2D& Vec
)

Public function

FVector2

(
    const FVector2< RealType2 >& Vec
)

Public function

FVector2

(
    T ValX,
    T ValY
)

Functions

Name Description

Public function Const

T

 

AngleD

(
    const FVector2< T >& V2
)

Angle in Degrees.

Public function Const

T

 

AngleR

(
    const FVector2< T >& V2
)

Angle in Radians.

Public function Const

constexpr T

 

Cross

(
    const FVector2< T >& V2
)

Public function Const

constexpr T

 

Distance

(
    const FVector2< T >& V2
)

Public function Const

constexpr T

 

DistanceSquared

(
    const FVector2< T >& V2
)

Public function Const

constexpr T

 

Dot

(
    const FVector2< T >& V2
)

Public function Const

constexpr T

 

DotPerp

(
    const FVector2< T >& V2
)

Note: DotPerp and FVector2's version of Cross are the same function.

Public function

constexpr bo...

 

IsNormalized()

Public function Const

constexpr T

 

Length()

Public function Static

FVector2< T ...

 

Lerp

(
    const FVector2< T >& A,
    const FVector2< T >& B,
    T Alpha
)

Public function

T

 

Normalize

(
    const T Epsilon
)

Public function Const

constexpr FV...

 

Normalized

(
    const T Epsilon
)

Public function Static

constexpr FV...

 

One()

Public function Static

T

 

Orient

(
    const FVector2< T >& A,
    const FVector2< T >& B,
    const FVector2< T >& C
)

Note: This was called "IsLeft" in the Geometry3Sharp code (where it also went through Math.Sign) Returns >0 if C is to the left of the A->B Line, <0 if to the right, 0 if on the line

Public function Const

constexpr FV...

 

Perp()

Public function Const

T

 

SignedAngleR

(
    const FVector2< T >& V2
)

Angle in Radians.

Public function Const

T

 

SquaredLength()

Public function Static

constexpr FV...

 

UnitX()

Public function Static

constexpr FV...

 

UnitY()

Public function Static

constexpr FV...

 

Zero()

Operators

Name Description

Public function Const

constexpr FV...

 

operator-()

Public function Const

constexpr FV...

 

operator-

(
    const FVector2& V2
)

Public function Const

constexpr FV...

 

operator-

(
    const T& Scalar
)

Public function Const

constexpr

 

operator const T *()

Public function Const

 

operator FVector2D()

Public function

constexpr

 

operator T *()

Public function Const

constexpr FV...

 

operator*

(
    const T& Scalar
)

Public function Const

constexpr FV...

 

operator*

(
    const RealType2& Scalar
)

Public function Const

constexpr FV...

 

operator*

(
    const FVector2< T >& V2
)

Public function

constexpr FV...

 

operator*=

(
    const T& Scalar
)

Public function Const

constexpr FV...

 

operator/

(
    const T& Scalar
)

Public function Const

constexpr FV...

 

operator/

(
    const FVector2< T >& V2
)

Public function

constexpr FV...

 

operator/=

(
    const T& Scalar
)

Public function

constexpr T ...

 

operator[]

(
    int Idx
)

Public function Const

constexpr co...

 

operator[]

(
    int Idx
)

Public function Const

constexpr FV...

 

operator+

(
    const T& Scalar
)

Public function Const

constexpr FV...

 

operator+

(
    const FVector2& V2
)

Public function

constexpr FV...

 

operator+=

(
    const FVector2< T >& V2
)

Public function

constexpr FV...

 

operator=

(
    const FVector2< T >& V2
)

Public function

constexpr FV...

 

operator-=

(
    const FVector2< T >& V2
)

Public function Const

bool

 

operator==

(
    const FVector2< T >& Other
)

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss