Ark Server API (ASA) - Wiki
|
#include <DirectXMath.h>
#include <DirectXPackedVector.h>
#include "Math/UnrealMathVectorConstants.h"
Go to the source code of this file.
Typedefs | |
typedef DirectX::XMVECTOR | VectorRegister |
typedef __m128i | VectorRegister4Int |
Definition at line 30 of file UnrealMathDirectX.h.
#define VECTOR_ROUND_TOWARD_ZERO _MM_ROUND_TOWARD_ZERO |
Control status bit to round all floating point math results towards zero.
Definition at line 864 of file UnrealMathDirectX.h.
#define VectorAbs | ( | Vec | ) | DirectX::XMVectorAbs( Vec ) |
Returns the absolute value (component-wise).
Vec | Source vector |
Definition at line 303 of file UnrealMathDirectX.h.
Adds two vectors (component-wise) and returns the result.
Vec1 | 1st vector |
Vec2 | 2nd vector |
Definition at line 320 of file UnrealMathDirectX.h.
Combines two vectors using bitwise AND (treating each vector as a 128 bit field)
Vec1 | 1st vector |
Vec2 | 2nd vector |
Definition at line 470 of file UnrealMathDirectX.h.
Combines two vectors using bitwise OR (treating each vector as a 128 bit field)
Vec1 | 1st vector |
Vec2 | 2nd vector |
Definition at line 461 of file UnrealMathDirectX.h.
Combines two vectors using bitwise XOR (treating each vector as a 128 bit field)
Vec1 | 1st vector |
Vec2 | 2nd vector |
Definition at line 479 of file UnrealMathDirectX.h.
Creates a four-part mask based on component-wise == compares of the input vectors
Vec1 | 1st vector |
Vec2 | 2nd vector |
Definition at line 396 of file UnrealMathDirectX.h.
Creates a four-part mask based on component-wise >= compares of the input vectors
Vec1 | 1st vector |
Vec2 | 2nd vector |
Definition at line 423 of file UnrealMathDirectX.h.
Creates a four-part mask based on component-wise > compares of the input vectors
Vec1 | 1st vector |
Vec2 | 2nd vector |
Definition at line 414 of file UnrealMathDirectX.h.
Creates a four-part mask based on component-wise <= compares of the input vectors
Vec1 | 1st vector |
Vec2 | 2nd vector |
Definition at line 441 of file UnrealMathDirectX.h.
Creates a four-part mask based on component-wise < compares of the input vectors
Vec1 | 1st vector |
Vec2 | 2nd vector |
Definition at line 432 of file UnrealMathDirectX.h.
Creates a four-part mask based on component-wise != compares of the input vectors
Vec1 | 1st vector |
Vec2 | 2nd vector |
Definition at line 405 of file UnrealMathDirectX.h.
Calculates the cross product of two vectors (XYZ components). W is set to 0.
Vec1 | 1st vector |
Vec2 | 2nd vector |
Definition at line 498 of file UnrealMathDirectX.h.
Divides two vectors (component-wise) and returns the result.
Vec1 | 1st vector |
Vec2 | 2nd vector |
Definition at line 347 of file UnrealMathDirectX.h.
Calculates the dot3 product of two vectors and returns a vector with the result in all 4 components. Only really efficient on Xbox 360.
Vec1 | 1st vector |
Vec2 | 2nd vector |
Definition at line 377 of file UnrealMathDirectX.h.
Calculates the dot4 product of two vectors and returns a vector with the result in all 4 components. Only really efficient on Xbox 360.
Vec1 | 1st vector |
Vec2 | 2nd vector |
Definition at line 387 of file UnrealMathDirectX.h.
#define VectorFloatToInt | ( | A | ) | _mm_cvttps_epi32(A) |
Definition at line 1202 of file UnrealMathDirectX.h.
#define VectorGetControlRegister | ( | ) | _mm_getcsr() |
Returns the control register.
Definition at line 852 of file UnrealMathDirectX.h.
Definition at line 1168 of file UnrealMathDirectX.h.
= a & b
Definition at line 1143 of file UnrealMathDirectX.h.
= (~a) & b
Definition at line 1149 of file UnrealMathDirectX.h.
Definition at line 1154 of file UnrealMathDirectX.h.
#define VectorIntCompareGE | ( | A, | |
B ) VectorIntNot(VectorIntCompareLT(A,B)) |
Definition at line 1158 of file UnrealMathDirectX.h.
Definition at line 1156 of file UnrealMathDirectX.h.
#define VectorIntCompareLE | ( | A, | |
B ) VectorIntNot(VectorIntCompareGT(A,B)) |
Definition at line 1159 of file UnrealMathDirectX.h.
Definition at line 1157 of file UnrealMathDirectX.h.
#define VectorIntCompareNEQ | ( | A, | |
B ) VectorIntNot(_mm_cmpeq_epi32(A,B)) |
Definition at line 1155 of file UnrealMathDirectX.h.
#define VectorIntLoad | ( | Ptr | ) | _mm_loadu_si128( (VectorRegister4Int*)(Ptr) ) |
Loads 4 int32s from unaligned memory.
Ptr | Unaligned memory pointer to the 4 int32s |
Definition at line 1225 of file UnrealMathDirectX.h.
#define VectorIntLoad1 | ( | Ptr | ) | _mm_shuffle_epi32(_mm_loadu_si128((VectorRegister4Int*)(Ptr)),_MM_SHUFFLE(0,0,0,0)) |
Loads 1 int32 from unaligned memory into all components of a vector register.
Ptr | Unaligned memory pointer to the 4 int32s |
Definition at line 1249 of file UnrealMathDirectX.h.
#define VectorIntLoadAligned | ( | Ptr | ) | _mm_load_si128( (VectorRegister4Int*)(Ptr) ) |
Loads 4 int32s from aligned memory.
Ptr | Aligned memory pointer to the 4 int32s |
Definition at line 1241 of file UnrealMathDirectX.h.
#define VectorIntNegate | ( | A | ) | VectorIntSubtract( GlobalVectorConstants::IntZero, A) |
Definition at line 1179 of file UnrealMathDirectX.h.
#define VectorIntNot | ( | A | ) | _mm_xor_si128(A, GlobalVectorConstants::IntAllMask) |
= ~a
Definition at line 1151 of file UnrealMathDirectX.h.
= a | b
Definition at line 1145 of file UnrealMathDirectX.h.
#define VectorIntSign | ( | A | ) | VectorIntSelect( VectorIntCompareGE(A, GlobalVectorConstants::IntZero), GlobalVectorConstants::IntOne, GlobalVectorConstants::IntMinusOne ) |
Definition at line 1199 of file UnrealMathDirectX.h.
#define VectorIntStore | ( | Vec, | |
Ptr ) _mm_storeu_si128( (VectorRegister4Int*)(Ptr), Vec ) |
Stores a vector to memory (aligned or unaligned).
Vec | Vector to store |
Ptr | Memory pointer |
Definition at line 1217 of file UnrealMathDirectX.h.
#define VectorIntStoreAligned | ( | Vec, | |
Ptr ) _mm_store_si128( (VectorRegister4Int*)(Ptr), Vec ) |
Stores a vector to memory (aligned).
Vec | Vector to store |
Ptr | Aligned Memory pointer |
Definition at line 1233 of file UnrealMathDirectX.h.
Definition at line 1169 of file UnrealMathDirectX.h.
#define VectorIntToFloat | ( | A | ) | _mm_cvtepi32_ps(A) |
Definition at line 1201 of file UnrealMathDirectX.h.
= a ^ b
Definition at line 1147 of file UnrealMathDirectX.h.
#define VectorLoad | ( | Ptr | ) | DirectX::XMLoadFloat4( (const DirectX::XMFLOAT4*)(Ptr) ) |
Loads 4 FLOATs from unaligned memory.
Ptr | Unaligned memory pointer to the 4 FLOATs |
Definition at line 125 of file UnrealMathDirectX.h.
#define VectorLoadAligned | ( | Ptr | ) | DirectX::XMLoadFloat4A( (const DirectX::XMFLOAT4A*)(Ptr) ) |
Loads 4 FLOATs from aligned memory.
Ptr | Aligned memory pointer to the 4 FLOATs |
Definition at line 159 of file UnrealMathDirectX.h.
#define VectorLoadByte4 | ( | Ptr | ) | DirectX::PackedVector::XMLoadUByte4((const DirectX::PackedVector::XMUBYTE4*)(Ptr) ) |
Loads 4 BYTEs from unaligned memory and converts them into 4 FLOATs. IMPORTANT: You need to call VectorResetFloatRegisters() before using scalar FLOATs after you've used this intrinsic!
Ptr | Unaligned memory pointer to the 4 BYTEs. |
Definition at line 736 of file UnrealMathDirectX.h.
#define VectorLoadFloat1 | ( | Ptr | ) | DirectX::XMVectorReplicatePtr( (const float*)(Ptr) ) |
Loads 1 float from unaligned memory and replicates it to all 4 elements.
Ptr | Unaligned memory pointer to the float |
Definition at line 167 of file UnrealMathDirectX.h.
#define VectorLoadFloat2 | ( | Ptr | ) | MakeVectorRegister( ((const float*)(Ptr))[0], ((const float*)(Ptr))[1], ((const float*)(Ptr))[0], ((const float*)(Ptr))[1] ) |
Loads 2 floats from unaligned memory into X and Y and duplicates them in Z and W.
Ptr | Unaligned memory pointer to the floats |
Definition at line 175 of file UnrealMathDirectX.h.
#define VectorLoadFloat3 | ( | Ptr | ) | MakeVectorRegister( ((const float*)(Ptr))[0], ((const float*)(Ptr))[1], ((const float*)(Ptr))[2], 0.0f ) |
Loads 3 FLOATs from unaligned memory and leaves W undefined.
Ptr | Unaligned memory pointer to the 3 FLOATs |
Definition at line 133 of file UnrealMathDirectX.h.
#define VectorLoadFloat3_W0 | ( | Ptr | ) | MakeVectorRegister( ((const float*)(Ptr))[0], ((const float*)(Ptr))[1], ((const float*)(Ptr))[2], 0.0f ) |
Loads 3 FLOATs from unaligned memory and sets W=0.
Ptr | Unaligned memory pointer to the 3 FLOATs |
Definition at line 142 of file UnrealMathDirectX.h.
#define VectorLoadFloat3_W1 | ( | Ptr | ) | MakeVectorRegister( ((const float*)(Ptr))[0], ((const float*)(Ptr))[1], ((const float*)(Ptr))[2], 1.0f ) |
Loads 3 FLOATs from unaligned memory and sets W=1.
Ptr | Unaligned memory pointer to the 3 FLOATs |
Definition at line 151 of file UnrealMathDirectX.h.
#define VectorLoadSignedByte4 | ( | Ptr | ) | DirectX::PackedVector::XMLoadByte4((const DirectX::PackedVector::XMBYTE4*)(Ptr) ) |
Loads 4 signed BYTEs from unaligned memory and converts them into 4 FLOATs. IMPORTANT: You need to call VectorResetFloatRegisters() before using scalar FLOATs after you've used this intrinsic!
Ptr | Unaligned memory pointer to the 4 BYTEs. |
Definition at line 745 of file UnrealMathDirectX.h.
#define VectorLoadSRGBA16N | ( | Ptr | ) | DirectX::PackedVector::XMLoadShortN4( (const DirectX::PackedVector::XMSHORTN4*)(Ptr) ) |
Loads packed RGBA16(4 bytes) from unaligned memory and converts them into 4 FLOATs. IMPORTANT: You need to call VectorResetFloatRegisters() before using scalar FLOATs after you've used this intrinsic!
Ptr | Unaligned memory pointer to the RGBA16(8 bytes). |
Definition at line 812 of file UnrealMathDirectX.h.
#define VectorLoadURGB10A2N | ( | Ptr | ) | DirectX::PackedVector::XMLoadUDecN4( (const DirectX::PackedVector::XMUDECN4*)(Ptr) ) |
Loads packed RGB10A2(4 bytes) from unaligned memory and converts them into 4 FLOATs. IMPORTANT: You need to call VectorResetFloatRegisters() before using scalar FLOATs after you've used this intrinsic!
Ptr | Unaligned memory pointer to the RGB10A2(4 bytes). |
Definition at line 785 of file UnrealMathDirectX.h.
#define VectorLoadURGBA16N | ( | Ptr | ) | DirectX::PackedVector::XMLoadUShortN4( (const DirectX::PackedVector::XMUSHORTN4*)(Ptr) ) |
Loads packed RGBA16(4 bytes) from unaligned memory and converts them into 4 FLOATs. IMPORTANT: You need to call VectorResetFloatRegisters() before using scalar FLOATs after you've used this intrinsic!
Ptr | Unaligned memory pointer to the RGBA16(8 bytes). |
Definition at line 803 of file UnrealMathDirectX.h.
Definition at line 713 of file UnrealMathDirectX.h.
Definition at line 712 of file UnrealMathDirectX.h.
Definition at line 711 of file UnrealMathDirectX.h.
Definition at line 710 of file UnrealMathDirectX.h.
These functions return a vector mask to indicate which components pass the comparison. Each component is 0xffffffff if it passes, 0x00000000 if it fails.
Vec1 | 1st source vector |
Vec2 | 2nd source vector |
Definition at line 709 of file UnrealMathDirectX.h.
Definition at line 714 of file UnrealMathDirectX.h.
#define VectorMaskBits | ( | VecMask | ) | _mm_movemask_ps( VecMask ) |
Returns an integer bit-mask (0x00 - 0x0f) based on the sign-bit for each component in a vector.
VecMask | Vector |
Definition at line 487 of file UnrealMathDirectX.h.
Returns the maximum values of two vectors (component-wise).
Vec1 | 1st vector |
Vec2 | 2nd vector |
Definition at line 634 of file UnrealMathDirectX.h.
Returns the minimum values of two vectors (component-wise).
Vec1 | 1st vector |
Vec2 | 2nd vector |
Definition at line 625 of file UnrealMathDirectX.h.
Multiplies two vectors (component-wise) and returns the result.
Vec1 | 1st vector |
Vec2 | 2nd vector |
Definition at line 338 of file UnrealMathDirectX.h.
Multiplies two vectors (component-wise), adds in the third vector and returns the result.
Vec1 | 1st vector |
Vec2 | 2nd vector |
Vec3 | 3rd vector |
Definition at line 357 of file UnrealMathDirectX.h.
#define VectorNegate | ( | Vec | ) | DirectX::XMVectorNegate( Vec ) |
Returns the negated value (component-wise).
Vec | Source vector |
Definition at line 311 of file UnrealMathDirectX.h.
#define VectorNegateMultiplyAdd | ( | Vec1, | |
Vec2, | |||
Vec3 ) DirectX::XMVectorNegativeMultiplySubtract( Vec1, Vec2, Vec3 ) |
Multiplies two vectors (component-wise), negates the results and adds it to the third vector i.e. -AB + C = C - AB
Vec1 | 1st vector |
Vec2 | 2nd vector |
Vec3 | 3rd vector |
Definition at line 367 of file UnrealMathDirectX.h.
#define VectorNormalize | ( | Vec | ) | DirectX::XMVector4NormalizeEst( Vec ) |
Normalize vector
Vector | Vector to normalize |
Definition at line 556 of file UnrealMathDirectX.h.
Calculates x raised to the power of y (component-wise).
Base | Base vector |
Exponent | Exponent vector |
Definition at line 507 of file UnrealMathDirectX.h.
#define VectorReciprocal | ( | Vec | ) | DirectX::XMVectorReciprocalEst( Vec ) |
#define VectorReciprocalAccurate | ( | Vec | ) | DirectX::XMVectorReciprocal( Vec ) |
#define VectorReciprocalLen | ( | Vec | ) | DirectX::XMVector4ReciprocalLengthEst( Vec ) |
Return Reciprocal Length of the vector
Vector | Vector |
Definition at line 532 of file UnrealMathDirectX.h.
#define VectorReciprocalSqrt | ( | Vec | ) | DirectX::XMVectorReciprocalSqrtEst( Vec ) |
Returns an estimate of 1/sqrt(c) for each component of the vector
Vector | Vector |
Definition at line 516 of file UnrealMathDirectX.h.
#define VectorReciprocalSqrtAccurate | ( | Vec | ) | DirectX::XMVectorReciprocalSqrt( Vec ) |
Return the reciprocal of the square root of each component
Vector | Vector |
Definition at line 540 of file UnrealMathDirectX.h.
#define VectorReplicate | ( | Vec, | |
ElementIndex ) DirectX::XMVectorSwizzle<ElementIndex,ElementIndex,ElementIndex,ElementIndex>(Vec) |
Replicates one element into all four elements and returns the new vector.
Vec | Source vector |
ElementIndex | Index (0-3) of the element to replicate |
Definition at line 295 of file UnrealMathDirectX.h.
#define VectorResetFloatRegisters | ( | ) |
Resets the floating point registers so that they can be used again. Some intrinsics use these for MMX purposes (e.g. VectorLoadByte4 and VectorStoreByte4).
Definition at line 845 of file UnrealMathDirectX.h.
Does a bitwise vector selection based on a mask (e.g., created from VectorCompareXX)
Mask | Mask (when 1: use the corresponding bit from Vec1 otherwise from Vec2) |
Vec1 | 1st vector |
Vec2 | 2nd vector |
Definition at line 452 of file UnrealMathDirectX.h.
Creates a vector out of four FLOATs.
X | 1st float component |
Y | 2nd float component |
Z | 3rd float component |
W | 4th float component |
Definition at line 220 of file UnrealMathDirectX.h.
#define VectorSet_W0 | ( | Vec | ) | DirectX::XMVectorAndInt( Vec , DirectX::g_XMMask3 ) |
Loads XYZ and sets W=0
Vector | VectorRegister |
Definition at line 564 of file UnrealMathDirectX.h.
#define VectorSet_W1 | ( | Vec | ) | DirectX::XMVectorPermute<0,1,2,7>( Vec, VectorOne() ) |
Loads XYZ and sets W=1
Vector | VectorRegister |
Definition at line 572 of file UnrealMathDirectX.h.
#define VectorSetControlRegister | ( | ControlStatus | ) | _mm_setcsr( ControlStatus ) |
Sets the control register.
ControlStatus | The uint32 control status value to set |
Definition at line 859 of file UnrealMathDirectX.h.
Propagates passed in float to all registers
X | float to replicate to all registers |
Definition at line 209 of file UnrealMathDirectX.h.
Creates a vector out of three FLOATs and leaves W undefined.
X | 1st float component |
Y | 2nd float component |
Z | 3rd float component |
Definition at line 201 of file UnrealMathDirectX.h.
#define VectorShuffle | ( | Vec1, | |
Vec2, | |||
X, | |||
Y, | |||
Z, | |||
W ) DirectX::XMVectorPermute<X,Y,Z+4,W+4>( Vec1, Vec2 ) |
Creates a vector through selecting two components from each vector via a shuffle mask.
Vec1 | Source vector1 |
Vec2 | Source vector2 |
X | Index for which component of Vector1 to use for X (literal 0-3) |
Y | Index for which component to Vector1 to use for Y (literal 0-3) |
Z | Index for which component to Vector2 to use for Z (literal 0-3) |
W | Index for which component to Vector2 to use for W (literal 0-3) |
Definition at line 659 of file UnrealMathDirectX.h.
#define VectorStore | ( | Vec, | |
Ptr ) DirectX::XMStoreFloat4((DirectX::XMFLOAT4*)(Ptr), Vec ) |
Stores a vector to memory (aligned or unaligned).
Vec | Vector to store |
Ptr | Memory pointer |
Definition at line 244 of file UnrealMathDirectX.h.
#define VectorStoreAligned | ( | Vec, | |
Ptr ) DirectX::XMStoreFloat4A((DirectX::XMFLOAT4A*)(Ptr), Vec ) |
Stores a vector to aligned memory.
Vec | Vector to store |
Ptr | Aligned memory pointer |
Definition at line 228 of file UnrealMathDirectX.h.
#define VectorStoreAlignedStreamed | ( | Vec, | |
Ptr ) XM_STREAM_PS( (float*)(Ptr), Vec ) |
Performs non-temporal store of a vector to aligned memory without polluting the caches
Vec | Vector to store |
Ptr | Aligned memory pointer |
Definition at line 236 of file UnrealMathDirectX.h.
#define VectorStoreByte4 | ( | Vec, | |
Ptr ) DirectX::PackedVector::XMStoreUByte4( (DirectX::PackedVector::XMUBYTE4*)(Ptr), Vec ) |
Converts the 4 FLOATs in the vector to 4 BYTEs, clamped to [0,255], and stores to unaligned memory. IMPORTANT: You need to call VectorResetFloatRegisters() before using scalar FLOATs after you've used this intrinsic!
Vec | Vector containing 4 FLOATs |
Ptr | Unaligned memory pointer to store the 4 BYTEs. |
Definition at line 767 of file UnrealMathDirectX.h.
#define VectorStoreFloat1 | ( | Vec, | |
Ptr ) DirectX::XMStoreFloat((float*)(Ptr), Vec ) |
Stores the X component of a vector to unaligned memory.
Vec | Vector to store X |
Ptr | Unaligned memory pointer |
Definition at line 260 of file UnrealMathDirectX.h.
#define VectorStoreFloat3 | ( | Vec, | |
Ptr ) DirectX::XMStoreFloat3((DirectX::XMFLOAT3*)(Ptr), Vec ) |
Stores the XYZ components of a vector to unaligned memory.
Vec | Vector to store XYZ |
Ptr | Unaligned memory pointer |
Definition at line 252 of file UnrealMathDirectX.h.
#define VectorStoreSignedByte4 | ( | Vec, | |
Ptr ) DirectX::PackedVector::XMStoreByte4( (DirectX::PackedVector::XMBYTE4*)(Ptr), Vec ) |
Converts the 4 FLOATs in the vector to 4 BYTEs, clamped to [-127,127], and stores to unaligned memory. IMPORTANT: You need to call VectorResetFloatRegisters() before using scalar FLOATs after you've used this intrinsic!
Vec | Vector containing 4 FLOATs |
Ptr | Unaligned memory pointer to store the 4 BYTEs. |
Definition at line 776 of file UnrealMathDirectX.h.
#define VectorStoreURGB10A2N | ( | Vec, | |
Ptr ) DirectX::PackedVector::XMStoreUDecN4( (const DirectX::PackedVector::XMUDECN4*)(Ptr), Vec ) |
Converts the 4 FLOATs in the vector RGB10A2, clamped to [0, 1023] and [0, 3], and stores to unaligned memory. IMPORTANT: You need to call VectorResetFloatRegisters() before using scalar FLOATs after you've used this intrinsic!
Vec | Vector containing 4 FLOATs |
Ptr | Unaligned memory pointer to store the packed RGB10A2(4 bytes). |
Definition at line 794 of file UnrealMathDirectX.h.
#define VectorStoreURGBA16N | ( | Vec, | |
Ptr ) DirectX::PackedVector::XMStoreUShortN4( (const DirectX::PackedVector::XMUSHORTN4*)(Ptr), Vec ) |
Converts the 4 FLOATs in the vector RGBA16, clamped to [0, 65535], and stores to unaligned memory. IMPORTANT: You need to call VectorResetFloatRegisters() before using scalar FLOATs after you've used this intrinsic!
Vec | Vector containing 4 FLOATs |
Ptr | Unaligned memory pointer to store the packed RGBA16(8 bytes). |
Definition at line 821 of file UnrealMathDirectX.h.
Subtracts a vector from another (component-wise) and returns the result.
Vec1 | 1st vector |
Vec2 | 2nd vector |
Definition at line 329 of file UnrealMathDirectX.h.
Swizzles the 4 components of a vector and returns the result.
Vec | Source vector |
X | Index for which component to use for X (literal 0-3) |
Y | Index for which component to use for Y (literal 0-3) |
Z | Index for which component to use for Z (literal 0-3) |
W | Index for which component to use for W (literal 0-3) |
Definition at line 646 of file UnrealMathDirectX.h.
#define VectorZero | ( | void | ) | DirectX::XMVectorZero() |
float4 vector register type, where the first float (X) is stored in the lowest 32 bits, and so on.
Definition at line 26 of file UnrealMathDirectX.h.
Definition at line 27 of file UnrealMathDirectX.h.
FORCEINLINE VectorRegister MakeVectorRegister | ( | float | X, |
float | Y, | ||
float | Z, | ||
float | W ) |
Returns a vector based on 4 FLOATs.
X | 1st float component |
Y | 2nd float component |
Z | 3rd float component |
W | 4th float component |
Definition at line 57 of file UnrealMathDirectX.h.
FORCEINLINE VectorRegister MakeVectorRegister | ( | uint32 | X, |
uint32 | Y, | ||
uint32 | Z, | ||
uint32 | W ) |
Returns a bitwise equivalent vector based on 4 DWORDs.
X | 1st uint32 component |
Y | 2nd uint32 component |
Z | 3rd uint32 component |
W | 4th uint32 component |
Definition at line 42 of file UnrealMathDirectX.h.
|
constexpr |
Definition at line 89 of file UnrealMathDirectX.h.
|
constexpr |
Definition at line 84 of file UnrealMathDirectX.h.
FORCEINLINE VectorRegister4Int MakeVectorRegisterInt | ( | int32 | X, |
int32 | Y, | ||
int32 | Z, | ||
int32 | W ) |
Returns a vector based on 4 int32.
X | 1st int32 component |
Y | 2nd int32 component |
Z | 3rd int32 component |
W | 4th int32 component |
Definition at line 71 of file UnrealMathDirectX.h.
|
constexpr |
Definition at line 76 of file UnrealMathDirectX.h.
FORCEINLINE VectorRegister VectorACos | ( | const VectorRegister & | X | ) |
Definition at line 1075 of file UnrealMathDirectX.h.
FORCEINLINE uint32 VectorAnyGreaterThan | ( | const VectorRegister & | Vec1, |
const VectorRegister & | Vec2 ) |
Returns non-zero if any element in Vec1 is greater than the corresponding element in Vec2, otherwise 0.
Vec1 | 1st source vector |
Vec2 | 2nd source vector |
Definition at line 830 of file UnrealMathDirectX.h.
FORCEINLINE VectorRegister VectorASin | ( | const VectorRegister & | X | ) |
Definition at line 1070 of file UnrealMathDirectX.h.
FORCEINLINE VectorRegister VectorATan | ( | const VectorRegister & | X | ) |
Definition at line 1080 of file UnrealMathDirectX.h.
FORCEINLINE VectorRegister VectorATan2 | ( | const VectorRegister & | X, |
const VectorRegister & | Y ) |
Definition at line 1085 of file UnrealMathDirectX.h.
FORCEINLINE VectorRegister VectorCeil | ( | const VectorRegister & | X | ) |
Definition at line 1090 of file UnrealMathDirectX.h.
FORCEINLINE VectorRegister VectorCombineHigh | ( | const VectorRegister & | Vec1, |
const VectorRegister & | Vec2 ) |
Creates a vector by combining two high components from each vector
Vec1 | Source vector1 |
Vec2 | Source vector2 |
Definition at line 668 of file UnrealMathDirectX.h.
FORCEINLINE VectorRegister VectorCombineLow | ( | const VectorRegister & | Vec1, |
const VectorRegister & | Vec2 ) |
Creates a vector by combining two low components from each vector
Vec1 | Source vector1 |
Vec2 | Source vector2 |
Definition at line 680 of file UnrealMathDirectX.h.
FORCEINLINE bool VectorContainsNaNOrInfinite | ( | const VectorRegister & | Vec | ) |
Definition at line 1021 of file UnrealMathDirectX.h.
FORCEINLINE VectorRegister VectorCos | ( | const VectorRegister & | X | ) |
Definition at line 1060 of file UnrealMathDirectX.h.
FORCEINLINE void VectorDeinterleave | ( | VectorRegister & | OutEvens, |
VectorRegister & | OutOdds, | ||
const VectorRegister & | Lo, | ||
const VectorRegister & | Hi ) |
Deinterleaves the components of the two given vectors such that the even components are in one vector and the odds in another.
Lo | [Even0, Odd0, Even1, Odd1] |
Hi | [Even2, Odd2, Even3, Odd3] |
OutEvens | [Even0, Even1, Even2, Even3] |
OutOdds | [Odd0, Odd1, Odd2, Odd3] |
Definition at line 694 of file UnrealMathDirectX.h.
FORCEINLINE VectorRegister VectorExp | ( | const VectorRegister & | X | ) |
Definition at line 1035 of file UnrealMathDirectX.h.
FORCEINLINE VectorRegister VectorExp2 | ( | const VectorRegister & | X | ) |
Definition at line 1040 of file UnrealMathDirectX.h.
FORCEINLINE VectorRegister VectorFloor | ( | const VectorRegister & | X | ) |
Definition at line 1095 of file UnrealMathDirectX.h.
FORCEINLINE VectorRegister VectorFractional | ( | const VectorRegister & | X | ) |
FORCEINLINE float VectorGetComponent | ( | VectorRegister | Vec, |
uint32 | ComponentIndex ) |
Returns an component from a vector.
Vec | Vector register |
ComponentIndex | Which component to get, X=0, Y=1, Z=2, W=3 |
Definition at line 270 of file UnrealMathDirectX.h.
FORCEINLINE VectorRegister4Int VectorIntAbs | ( | const VectorRegister4Int & | A | ) |
FORCEINLINE VectorRegister4Int VectorIntMax | ( | const VectorRegister4Int & | A, |
const VectorRegister4Int & | B ) |
FORCEINLINE VectorRegister4Int VectorIntMin | ( | const VectorRegister4Int & | A, |
const VectorRegister4Int & | B ) |
FORCEINLINE VectorRegister4Int VectorIntMultiply | ( | const VectorRegister4Int & | A, |
const VectorRegister4Int & | B ) |
Definition at line 1171 of file UnrealMathDirectX.h.
FORCEINLINE VectorRegister4Int VectorIntSelect | ( | const VectorRegister4Int & | Mask, |
const VectorRegister4Int & | Vec1, | ||
const VectorRegister4Int & | Vec2 ) |
FORCEINLINE VectorRegister VectorLoadByte4Reverse | ( | const uint8 * | Ptr | ) |
Loads 4 BYTEs from unaligned memory and converts them into 4 FLOATs in reversed order. IMPORTANT: You need to call VectorResetFloatRegisters() before using scalar FLOATs after you've used this intrinsic!
Ptr | Unaligned memory pointer to the 4 BYTEs. |
Definition at line 754 of file UnrealMathDirectX.h.
FORCEINLINE VectorRegister VectorLoadTwoPairsFloat | ( | const float * | Ptr1, |
const float * | Ptr2 ) |
Loads 4 unaligned floats - 2 from the first pointer, 2 from the second, and packs them in to 1 vector.
Ptr1 | Unaligned memory pointer to the first 2 floats |
Ptr2 | Unaligned memory pointer to the second 2 floats |
Definition at line 185 of file UnrealMathDirectX.h.
FORCEINLINE VectorRegister VectorLog | ( | const VectorRegister & | X | ) |
Definition at line 1045 of file UnrealMathDirectX.h.
FORCEINLINE VectorRegister VectorLog2 | ( | const VectorRegister & | X | ) |
Definition at line 1050 of file UnrealMathDirectX.h.
FORCEINLINE void VectorMatrixInverse | ( | FMatrix * | DstMatrix, |
const FMatrix * | SrcMatrix ) |
Calculate the inverse of an FMatrix.
DstMatrix | FMatrix pointer to where the result should be stored |
SrcMatrix | FMatrix pointer to the Matrix to be inversed |
Definition at line 596 of file UnrealMathDirectX.h.
FORCEINLINE void VectorMatrixMultiply | ( | FMatrix * | Result, |
const FMatrix * | Matrix1, | ||
const FMatrix * | Matrix2 ) |
Multiplies two 4x4 matrices.
Result | Pointer to where the result should be stored |
Matrix1 | Pointer to the first matrix |
Matrix2 | Pointer to the second matrix |
Definition at line 581 of file UnrealMathDirectX.h.
FORCEINLINE VectorRegister VectorMergeVecXYZ_VecW | ( | const VectorRegister & | VecXYZ, |
const VectorRegister & | VecW ) |
Merges the XYZ components of one vector with the W component of another vector and returns the result.
VecXYZ | Source vector for XYZ_ |
VecW | Source register for ___W (note: the fourth component is used, not the first) |
Definition at line 723 of file UnrealMathDirectX.h.
FORCEINLINE VectorRegister VectorMod | ( | const VectorRegister & | X, |
const VectorRegister & | Y ) |
Definition at line 1110 of file UnrealMathDirectX.h.
FORCEINLINE void VectorQuaternionMultiply | ( | FQuat * | Result, |
const FQuat * | Quat1, | ||
const FQuat * | Quat2 ) |
Multiplies two quaternions; the order matters.
When composing quaternions: VectorQuaternionMultiply(C, A, B) will yield a quaternion C = A * B that logically first applies B then A to any subsequent transformation (right first, then left).
Result | Pointer to where the result Quat1 * Quat2 should be stored |
Quat1 | Pointer to the first quaternion (must not be the destination) |
Quat2 | Pointer to the second quaternion (must not be the destination) |
Definition at line 899 of file UnrealMathDirectX.h.
FORCEINLINE void VectorQuaternionMultiply | ( | VectorRegister * | VResult, |
const VectorRegister * | VQuat1, | ||
const VectorRegister * | VQuat2 ) |
Multiplies two quaternions; the order matters.
When composing quaternions: VectorQuaternionMultiply(C, A, B) will yield a quaternion C = A * B that logically first applies B then A to any subsequent transformation (right first, then left).
Result | Pointer to where the result Quat1 * Quat2 should be stored |
Quat1 | Pointer to the first quaternion (must not be the destination) |
Quat2 | Pointer to the second quaternion (must not be the destination) |
Definition at line 918 of file UnrealMathDirectX.h.
FORCEINLINE VectorRegister VectorQuaternionMultiply2 | ( | const VectorRegister & | Quat1, |
const VectorRegister & | Quat2 ) |
Multiplies two quaternions; the order matters.
Order matters when composing quaternions: C = VectorQuaternionMultiply2(A, B) will yield a quaternion C = A * B that logically first applies B then A to any subsequent transformation (right first, then left).
Quat1 | Pointer to the first quaternion |
Quat2 | Pointer to the second quaternion |
Definition at line 876 of file UnrealMathDirectX.h.
FORCEINLINE void VectorQuaternionVector3InverseRotate | ( | FVector * | Result, |
const FVector * | Vec, | ||
const FQuat * | Quat ) |
Definition at line 931 of file UnrealMathDirectX.h.
FORCEINLINE void VectorQuaternionVector3Rotate | ( | FVector * | Result, |
const FVector * | Vec, | ||
const FQuat * | Quat ) |
Definition at line 923 of file UnrealMathDirectX.h.
FORCEINLINE VectorRegister4Int VectorRoundToIntHalfToEven | ( | const VectorRegister4Float & | Vec | ) |
Definition at line 1204 of file UnrealMathDirectX.h.
FORCEINLINE VectorRegister VectorSign | ( | const VectorRegister & | X | ) |
FORCEINLINE VectorRegister VectorSin | ( | const VectorRegister & | X | ) |
Definition at line 1055 of file UnrealMathDirectX.h.
FORCEINLINE void VectorSinCos | ( | VectorRegister *RESTRICT | VSinAngles, |
VectorRegister *RESTRICT | VCosAngles, | ||
const VectorRegister *RESTRICT | VAngles ) |
Computes the sine and cosine of each component of a Vector.
VSinAngles | VectorRegister Pointer to where the Sin result should be stored |
VCosAngles | VectorRegister Pointer to where the Cos result should be stored |
VAngles | VectorRegister Pointer to the input angles |
Definition at line 947 of file UnrealMathDirectX.h.
FORCEINLINE VectorRegister VectorStep | ( | const VectorRegister & | X | ) |
FORCEINLINE VectorRegister VectorTan | ( | const VectorRegister & | X | ) |
Definition at line 1065 of file UnrealMathDirectX.h.
FORCEINLINE VectorRegister VectorTransformVector | ( | const VectorRegister & | VecP, |
const FMatrix * | MatrixM ) |
Calculate Homogeneous transform.
VecP | VectorRegister |
MatrixM | FMatrix pointer to the Matrix to apply transform |
Definition at line 611 of file UnrealMathDirectX.h.
FORCEINLINE VectorRegister VectorTruncate | ( | const VectorRegister & | X | ) |