Choose your operating system:
Windows
macOS
Linux
| TVector2
|
Module |
|
Header |
/Engine/Source/Runtime/Core/Public/CoreFwd.h |
Include |
#include "CoreFwd.h" |
template<typename T>
struct TVector2
Name | Description | ||
---|---|---|---|
|
T |
X |
Vector's X component. |
|
T |
Y |
Vector's Y component. |
Name | Description | |
---|---|---|
|
TVector2() |
Default constructor (no initialization). |
|
TVector2 ( |
Constructor initializing both components to a single T value. |
|
TVector2 ( |
Constructs a vector from an FIntPoint. |
|
TVector2 ( |
Constructor which initializes all components to zero. |
|
TVector2 ( |
Constructor that does not initialize. More explicit than the default constructor. |
|
TVector2 ( |
Constructs a vector from an FVector. Copies the X and Y components from the FVector. |
|
TVector2 ( |
Constructs a vector from an FVector4. |
|
TVector2 ( |
Conversion from other type. TODO: explicit! |
|
TVector2 ( |
Constructor using initial values for each component. |
Name | Description | ||
---|---|---|---|
|
TVector2< T ... |
ClampAxes ( |
Creates a copy of this vector with both axes clamped to the given range. |
|
T |
Component ( |
Gets a specific component of the vector. |
|
T & |
Component ( |
Gets a specific component of the vector. |
|
ContainsNaN() |
Utility to check if there are any non-finite values (NaN or Inf) in this vector. |
|
|
T |
CrossProduct |
Calculate the cross product of two vectors. |
|
DiagnosticCheckNaN() |
||
|
T |
Distance |
Distance between two 2D points. |
|
T |
DistSquared |
Squared distance between two 2D points. |
|
T |
Dot ( |
Get the dot product of this vector against another. |
|
T |
DotProduct |
Calculates the dot product of two vectors. |
|
Equals ( |
Checks for equality with error-tolerant comparison. |
|
|
TVector2< T ... |
GetAbs() |
Get a copy of this vector with absolute value of each component. |
|
T |
GetAbsMax() |
Get the maximum absolute value of the vector's components. |
|
T |
GetMax() |
Get the maximum value of the vector's components. |
|
T |
GetMin() |
Get the minimum value of the vector's components. |
|
TVector2< T ... |
GetRotated ( |
Rotates around axis (0,0,1) |
|
TVector2< T ... |
GetSafeNormal ( |
Gets a normalized copy of the vector, checking it is safe to do so based on the length. |
|
TVector2< T ... |
GetSignVector() |
Get a copy of the vector as sign only. |
|
InitFromString ( |
Initialize this Vector based on an FString. |
|
|
IntPoint() |
Get this vector as an Int Point. |
|
|
IsNearlyZero ( |
Checks whether vector is near to zero within a specified tolerance. |
|
|
IsZero() |
Checks whether all components of the vector are exactly zero. |
|
|
T |
Length() |
Get the length (magnitude) of this vector. |
|
TVector2< T ... |
Max |
Returns a vector with the maximum component for each dimension from the pair of vectors. |
|
TVector2< T ... |
Min |
Returns a vector with the minimum component for each dimension from the pair of vectors. |
|
NetSerialize ( |
Network serialization function. |
|
|
Normalize ( |
Normalize this vector in-place if it is large enough, set it to (0,0) otherwise. |
|
|
TVector2< T ... |
One() |
|
|
TVector2< T ... |
RoundToVector() |
Get this vector as a vector where each component has been rounded to the nearest int. |
|
Serialize ( |
||
|
Serialize ( |
||
|
SerializeFromMismatchedTag |
||
|
Set ( |
Set the values of the vector directly. |
|
|
T |
Size() |
Get the length (magnitude) of this vector. |
|
T |
SizeSquared() |
Get the squared length of this vector. |
|
TVector< T > |
SphericalToUnitCartesian() |
Converts spherical coordinates on the unit sphere into a Cartesian unit length vector. |
|
T |
SquaredLength() |
Get the squared length of this vector. |
|
ToDirectionAndLength ( |
Util to convert this vector into a unit direction vector and its original length. |
|
|
ToDirectionAndLength ( |
Util to convert this vector into a unit direction vector and its original length. |
|
|
ToString() |
Get a textual representation of the vector. |
|
|
TVector2< T ... |
UnitX() |
|
|
TVector2< T ... |
UnitY() |
|
|
TVector2< T ... |
Zero() |
Name | Description | ||
---|---|---|---|
|
TVector2< T ... |
operator-() |
Gets a negated copy of the vector. |
|
TVector2< T ... |
operator- ( |
Gets the result of subtracting A from each component of the vector. |
|
TVector2< T ... |
operator- ( |
Gets the result of subtracting a vector from this one. |
|
operator!= ( |
Compares this vector against another for inequality. |
|
|
TVector2< T ... |
operator* ( |
Gets the result of component-wise multiplication of this vector by another. |
|
TVector2< T ... |
operator* ( |
Gets the result of scaling the vector (multiplying each component by a value). |
|
TVector2< T ... |
operator*= ( |
Multiplies this vector with another vector, using component-wise multiplication. |
|
TVector2< T ... |
operator*= ( |
Scales this vector. |
|
TVector2< T ... |
operator/ ( |
Gets the result of dividing each component of the vector by a value. |
|
TVector2< T ... |
operator/ ( |
Gets the result of component-wise division of this vector by another. |
|
TVector2< T ... |
operator/= ( |
Divides this vector. |
|
TVector2< T ... |
operator/= ( |
Divides this vector by another vector, using component-wise division. |
|
T |
operator[] ( |
Gets specific component of the vector. |
|
T & |
operator[] ( |
Gets specific component of the vector. |
|
T |
operator^ ( |
Calculates cross product of this vector and another. |
|
T |
operator| ( |
Calculates dot product of this vector and another. |
|
TVector2< T ... |
operator+ ( |
Gets the result of adding A to each component of the vector. |
|
TVector2< T ... |
operator+ ( |
Gets the result of adding two vectors together. |
|
TVector2< T ... |
operator+= ( |
Adds another vector to this. |
|
operator< ( |
Checks whether both components of this vector are less than another. |
|
|
operator<= ( |
Checks whether both components of this vector are less than or equal to another. |
|
|
TVector2< T ... |
operator-= ( |
Subtracts another vector from this. |
|
operator== ( |
Compares this vector against another for equality. |
|
|
operator> ( |
Checks whether both components of this vector are greater than another. |
|
|
operator>= ( |
Checks whether both components of this vector are greater than or equal to another. |
Name |
Description |
---|---|
FReal |
Name |
Description |
---|---|
Unit45Deg |
Global 2D unit vector constant along the 45 degree angle or symmetrical positive axes (sqrt(.5),sqrt(.5)) or (.707,.707). |
UnitVector |
Global 2D one vector (poorly named) constant (1,1). |
ZeroVector |
Global 2D zero vector constant (0,0) |