mirror of
https://github.com/microsoft/DirectXMath
synced 2024-11-08 21:50:09 +00:00
XNAMath 2.03
This commit is contained in:
parent
9a1e0b5318
commit
6ba6bf874e
513
Inc/xnamath.h
513
Inc/xnamath.h
@ -22,7 +22,7 @@ Abstract:
|
||||
#error XNAMATH and XBOXMATH are incompatible in the same compilation module. Use one or the other.
|
||||
#endif
|
||||
|
||||
#define XNAMATH_VERSION 202
|
||||
#define XNAMATH_VERSION 203
|
||||
|
||||
#if !defined(_XM_X64_) && !defined(_XM_X86_)
|
||||
#if defined(_M_AMD64) || defined(_AMD64_)
|
||||
@ -116,10 +116,6 @@ Abstract:
|
||||
#define _XM_ISVS2005_
|
||||
#endif
|
||||
|
||||
#if defined(_MSC_VER) && (_MSC_VER<1600) && (_MSC_VER>=1500)
|
||||
#define _XM_ISVS2008_
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
* Constant definitions
|
||||
@ -184,7 +180,7 @@ XMFINLINE FLOAT XMConvertToDegrees(FLOAT fRadians) { return fRadians * (180.0f /
|
||||
****************************************************************************/
|
||||
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable:4201 4365)
|
||||
#pragma warning(disable:4201 4365 4324)
|
||||
|
||||
#if !defined (_XM_X86_) && !defined(_XM_X64_)
|
||||
#pragma bitfield_order(push)
|
||||
@ -408,7 +404,18 @@ typedef struct _XMFLOAT2
|
||||
} XMFLOAT2;
|
||||
|
||||
// 2D Vector; 32 bit floating point components aligned on a 16 byte boundary
|
||||
#ifdef __cplusplus
|
||||
__declspec(align(16)) struct XMFLOAT2A : public XMFLOAT2
|
||||
{
|
||||
XMFLOAT2A() : XMFLOAT2() {};
|
||||
XMFLOAT2A(FLOAT _x, FLOAT _y) : XMFLOAT2(_x, _y) {};
|
||||
XMFLOAT2A(CONST FLOAT *pArray) : XMFLOAT2(pArray) {};
|
||||
|
||||
XMFLOAT2A& operator= (CONST XMFLOAT2A& Float2);
|
||||
};
|
||||
#else
|
||||
typedef __declspec(align(16)) XMFLOAT2 XMFLOAT2A;
|
||||
#endif // __cplusplus
|
||||
|
||||
// 2D Vector; 16 bit floating point components
|
||||
typedef struct _XMHALF2
|
||||
@ -530,7 +537,18 @@ typedef struct _XMFLOAT3
|
||||
} XMFLOAT3;
|
||||
|
||||
// 3D Vector; 32 bit floating point components aligned on a 16 byte boundary
|
||||
#ifdef __cplusplus
|
||||
__declspec(align(16)) struct XMFLOAT3A : public XMFLOAT3
|
||||
{
|
||||
XMFLOAT3A() : XMFLOAT3() {};
|
||||
XMFLOAT3A(FLOAT _x, FLOAT _y, FLOAT _z) : XMFLOAT3(_x, _y, _z) {};
|
||||
XMFLOAT3A(CONST FLOAT *pArray) : XMFLOAT3(pArray) {};
|
||||
|
||||
XMFLOAT3A& operator= (CONST XMFLOAT3A& Float3);
|
||||
};
|
||||
#else
|
||||
typedef __declspec(align(16)) XMFLOAT3 XMFLOAT3A;
|
||||
#endif // __cplusplus
|
||||
|
||||
// 3D Vector; 11-11-10 bit normalized components packed into a 32 bit integer
|
||||
// The normalized 3D Vector is packed into 32 bits as follows: a 10 bit signed,
|
||||
@ -942,7 +960,18 @@ typedef struct _XMFLOAT4
|
||||
} XMFLOAT4;
|
||||
|
||||
// 4D Vector; 32 bit floating point components aligned on a 16 byte boundary
|
||||
#ifdef __cplusplus
|
||||
__declspec(align(16)) struct XMFLOAT4A : public XMFLOAT4
|
||||
{
|
||||
XMFLOAT4A() : XMFLOAT4() {};
|
||||
XMFLOAT4A(FLOAT _x, FLOAT _y, FLOAT _z, FLOAT _w) : XMFLOAT4(_x, _y, _z, _w) {};
|
||||
XMFLOAT4A(CONST FLOAT *pArray) : XMFLOAT4(pArray) {};
|
||||
|
||||
XMFLOAT4A& operator= (CONST XMFLOAT4A& Float4);
|
||||
};
|
||||
#else
|
||||
typedef __declspec(align(16)) XMFLOAT4 XMFLOAT4A;
|
||||
#endif // __cplusplus
|
||||
|
||||
// 4D Vector; 16 bit floating point components
|
||||
typedef struct _XMHALF4
|
||||
@ -1773,7 +1802,25 @@ typedef struct _XMFLOAT4X3
|
||||
} XMFLOAT4X3;
|
||||
|
||||
// 4x3 Matrix: 32 bit floating point components aligned on a 16 byte boundary
|
||||
#ifdef __cplusplus
|
||||
__declspec(align(16)) struct XMFLOAT4X3A : public XMFLOAT4X3
|
||||
{
|
||||
XMFLOAT4X3A() : XMFLOAT4X3() {};
|
||||
XMFLOAT4X3A(FLOAT m00, FLOAT m01, FLOAT m02,
|
||||
FLOAT m10, FLOAT m11, FLOAT m12,
|
||||
FLOAT m20, FLOAT m21, FLOAT m22,
|
||||
FLOAT m30, FLOAT m31, FLOAT m32) :
|
||||
XMFLOAT4X3(m00,m01,m02,m10,m11,m12,m20,m21,m22,m30,m31,m32) {};
|
||||
XMFLOAT4X3A(CONST FLOAT *pArray) : XMFLOAT4X3(pArray) {}
|
||||
|
||||
FLOAT operator() (UINT Row, UINT Column) CONST { return m[Row][Column]; }
|
||||
FLOAT& operator() (UINT Row, UINT Column) { return m[Row][Column]; }
|
||||
|
||||
XMFLOAT4X3A& operator= (CONST XMFLOAT4X3A& Float4x3);
|
||||
};
|
||||
#else
|
||||
typedef __declspec(align(16)) XMFLOAT4X3 XMFLOAT4X3A;
|
||||
#endif // __cplusplus
|
||||
|
||||
// 4x4 Matrix: 32 bit floating point components
|
||||
typedef struct _XMFLOAT4X4
|
||||
@ -1809,7 +1856,25 @@ typedef struct _XMFLOAT4X4
|
||||
} XMFLOAT4X4;
|
||||
|
||||
// 4x4 Matrix: 32 bit floating point components aligned on a 16 byte boundary
|
||||
#ifdef __cplusplus
|
||||
__declspec(align(16)) struct XMFLOAT4X4A : public XMFLOAT4X4
|
||||
{
|
||||
XMFLOAT4X4A() : XMFLOAT4X4() {};
|
||||
XMFLOAT4X4A(FLOAT m00, FLOAT m01, FLOAT m02, FLOAT m03,
|
||||
FLOAT m10, FLOAT m11, FLOAT m12, FLOAT m13,
|
||||
FLOAT m20, FLOAT m21, FLOAT m22, FLOAT m23,
|
||||
FLOAT m30, FLOAT m31, FLOAT m32, FLOAT m33)
|
||||
: XMFLOAT4X4(m00,m01,m02,m03,m10,m11,m12,m13,m20,m21,m22,m23,m30,m31,m32,m33) {};
|
||||
XMFLOAT4X4A(CONST FLOAT *pArray) : XMFLOAT4X4(pArray) {}
|
||||
|
||||
FLOAT operator() (UINT Row, UINT Column) CONST { return m[Row][Column]; }
|
||||
FLOAT& operator() (UINT Row, UINT Column) { return m[Row][Column]; }
|
||||
|
||||
XMFLOAT4X4A& operator= (CONST XMFLOAT4X4A& Float4x4);
|
||||
};
|
||||
#else
|
||||
typedef __declspec(align(16)) XMFLOAT4X4 XMFLOAT4X4A;
|
||||
#endif // __cplusplus
|
||||
|
||||
#if !defined(_XM_X86_) && !defined(_XM_X64_)
|
||||
#pragma bitfield_order(pop)
|
||||
@ -1817,6 +1882,7 @@ typedef __declspec(align(16)) XMFLOAT4X4 XMFLOAT4X4A;
|
||||
|
||||
#pragma warning(pop)
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
* Data conversion operations
|
||||
@ -1832,15 +1898,15 @@ XMVECTOR XMConvertVectorFloatToUInt(FXMVECTOR VFloat, UINT MulExponent);
|
||||
#endif
|
||||
|
||||
FLOAT XMConvertHalfToFloat(HALF Value);
|
||||
FLOAT* XMConvertHalfToFloatStream(__out_bcount(sizeof(FLOAT)+OutputStride*(HalfCount-1)) FLOAT* pOutputStream,
|
||||
__in UINT OutputStride,
|
||||
__in_bcount(sizeof(HALF)+InputStride*(HalfCount-1)) CONST HALF* pInputStream,
|
||||
__in UINT InputStride, __in UINT HalfCount);
|
||||
FLOAT* XMConvertHalfToFloatStream(_Out_bytecap_x_(sizeof(FLOAT)+OutputStride*(HalfCount-1)) FLOAT* pOutputStream,
|
||||
_In_ UINT OutputStride,
|
||||
_In_bytecount_x_(sizeof(HALF)+InputStride*(HalfCount-1)) CONST HALF* pInputStream,
|
||||
_In_ UINT InputStride, _In_ UINT HalfCount);
|
||||
HALF XMConvertFloatToHalf(FLOAT Value);
|
||||
HALF* XMConvertFloatToHalfStream(__out_bcount(sizeof(HALF)+OutputStride*(FloatCount-1)) HALF* pOutputStream,
|
||||
__in UINT OutputStride,
|
||||
__in_bcount(sizeof(FLOAT)+InputStride*(FloatCount-1)) CONST FLOAT* pInputStream,
|
||||
__in UINT InputStride, __in UINT FloatCount);
|
||||
HALF* XMConvertFloatToHalfStream(_Out_bytecap_x_(sizeof(HALF)+OutputStride*(FloatCount-1)) HALF* pOutputStream,
|
||||
_In_ UINT OutputStride,
|
||||
_In_bytecount_x_(sizeof(FLOAT)+InputStride*(FloatCount-1)) CONST FLOAT* pInputStream,
|
||||
_In_ UINT InputStride, _In_ UINT FloatCount);
|
||||
|
||||
#if !defined(_XM_NO_INTRINSICS_) && defined(_XM_VMX128_INTRINSICS_)
|
||||
#else
|
||||
@ -1855,69 +1921,69 @@ XMVECTOR XMVectorSplatConstantInt(INT IntConstant);
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
XMVECTOR XMLoadInt(__in CONST UINT* pSource);
|
||||
XMVECTOR XMLoadFloat(__in CONST FLOAT* pSource);
|
||||
XMVECTOR XMLoadInt(_In_ CONST UINT* pSource);
|
||||
XMVECTOR XMLoadFloat(_In_ CONST FLOAT* pSource);
|
||||
|
||||
XMVECTOR XMLoadInt2(__in_ecount(2) CONST UINT* pSource);
|
||||
XMVECTOR XMLoadInt2A(__in_ecount(2) CONST UINT* PSource);
|
||||
XMVECTOR XMLoadFloat2(__in CONST XMFLOAT2* pSource);
|
||||
XMVECTOR XMLoadFloat2A(__in CONST XMFLOAT2A* pSource);
|
||||
XMVECTOR XMLoadHalf2(__in CONST XMHALF2* pSource);
|
||||
XMVECTOR XMLoadShortN2(__in CONST XMSHORTN2* pSource);
|
||||
XMVECTOR XMLoadShort2(__in CONST XMSHORT2* pSource);
|
||||
XMVECTOR XMLoadUShortN2(__in CONST XMUSHORTN2* pSource);
|
||||
XMVECTOR XMLoadUShort2(__in CONST XMUSHORT2* pSource);
|
||||
XMVECTOR XMLoadInt2(_In_count_c_(2) CONST UINT* pSource);
|
||||
XMVECTOR XMLoadInt2A(_In_count_c_(2) CONST UINT* PSource);
|
||||
XMVECTOR XMLoadFloat2(_In_ CONST XMFLOAT2* pSource);
|
||||
XMVECTOR XMLoadFloat2A(_In_ CONST XMFLOAT2A* pSource);
|
||||
XMVECTOR XMLoadHalf2(_In_ CONST XMHALF2* pSource);
|
||||
XMVECTOR XMLoadShortN2(_In_ CONST XMSHORTN2* pSource);
|
||||
XMVECTOR XMLoadShort2(_In_ CONST XMSHORT2* pSource);
|
||||
XMVECTOR XMLoadUShortN2(_In_ CONST XMUSHORTN2* pSource);
|
||||
XMVECTOR XMLoadUShort2(_In_ CONST XMUSHORT2* pSource);
|
||||
|
||||
XMVECTOR XMLoadInt3(__in_ecount(3) CONST UINT* pSource);
|
||||
XMVECTOR XMLoadInt3A(__in_ecount(3) CONST UINT* pSource);
|
||||
XMVECTOR XMLoadFloat3(__in CONST XMFLOAT3* pSource);
|
||||
XMVECTOR XMLoadFloat3A(__in CONST XMFLOAT3A* pSource);
|
||||
XMVECTOR XMLoadHenDN3(__in CONST XMHENDN3* pSource);
|
||||
XMVECTOR XMLoadHenD3(__in CONST XMHEND3* pSource);
|
||||
XMVECTOR XMLoadUHenDN3(__in CONST XMUHENDN3* pSource);
|
||||
XMVECTOR XMLoadUHenD3(__in CONST XMUHEND3* pSource);
|
||||
XMVECTOR XMLoadDHenN3(__in CONST XMDHENN3* pSource);
|
||||
XMVECTOR XMLoadDHen3(__in CONST XMDHEN3* pSource);
|
||||
XMVECTOR XMLoadUDHenN3(__in CONST XMUDHENN3* pSource);
|
||||
XMVECTOR XMLoadUDHen3(__in CONST XMUDHEN3* pSource);
|
||||
XMVECTOR XMLoadU565(__in CONST XMU565* pSource);
|
||||
XMVECTOR XMLoadFloat3PK(__in CONST XMFLOAT3PK* pSource);
|
||||
XMVECTOR XMLoadFloat3SE(__in CONST XMFLOAT3SE* pSource);
|
||||
XMVECTOR XMLoadInt3(_In_count_c_(3) CONST UINT* pSource);
|
||||
XMVECTOR XMLoadInt3A(_In_count_c_(3) CONST UINT* pSource);
|
||||
XMVECTOR XMLoadFloat3(_In_ CONST XMFLOAT3* pSource);
|
||||
XMVECTOR XMLoadFloat3A(_In_ CONST XMFLOAT3A* pSource);
|
||||
XMVECTOR XMLoadHenDN3(_In_ CONST XMHENDN3* pSource);
|
||||
XMVECTOR XMLoadHenD3(_In_ CONST XMHEND3* pSource);
|
||||
XMVECTOR XMLoadUHenDN3(_In_ CONST XMUHENDN3* pSource);
|
||||
XMVECTOR XMLoadUHenD3(_In_ CONST XMUHEND3* pSource);
|
||||
XMVECTOR XMLoadDHenN3(_In_ CONST XMDHENN3* pSource);
|
||||
XMVECTOR XMLoadDHen3(_In_ CONST XMDHEN3* pSource);
|
||||
XMVECTOR XMLoadUDHenN3(_In_ CONST XMUDHENN3* pSource);
|
||||
XMVECTOR XMLoadUDHen3(_In_ CONST XMUDHEN3* pSource);
|
||||
XMVECTOR XMLoadU565(_In_ CONST XMU565* pSource);
|
||||
XMVECTOR XMLoadFloat3PK(_In_ CONST XMFLOAT3PK* pSource);
|
||||
XMVECTOR XMLoadFloat3SE(_In_ CONST XMFLOAT3SE* pSource);
|
||||
|
||||
XMVECTOR XMLoadInt4(__in_ecount(4) CONST UINT* pSource);
|
||||
XMVECTOR XMLoadInt4A(__in_ecount(4) CONST UINT* pSource);
|
||||
XMVECTOR XMLoadFloat4(__in CONST XMFLOAT4* pSource);
|
||||
XMVECTOR XMLoadFloat4A(__in CONST XMFLOAT4A* pSource);
|
||||
XMVECTOR XMLoadHalf4(__in CONST XMHALF4* pSource);
|
||||
XMVECTOR XMLoadShortN4(__in CONST XMSHORTN4* pSource);
|
||||
XMVECTOR XMLoadShort4(__in CONST XMSHORT4* pSource);
|
||||
XMVECTOR XMLoadUShortN4(__in CONST XMUSHORTN4* pSource);
|
||||
XMVECTOR XMLoadUShort4(__in CONST XMUSHORT4* pSource);
|
||||
XMVECTOR XMLoadXIcoN4(__in CONST XMXICON4* pSource);
|
||||
XMVECTOR XMLoadXIco4(__in CONST XMXICO4* pSource);
|
||||
XMVECTOR XMLoadIcoN4(__in CONST XMICON4* pSource);
|
||||
XMVECTOR XMLoadIco4(__in CONST XMICO4* pSource);
|
||||
XMVECTOR XMLoadUIcoN4(__in CONST XMUICON4* pSource);
|
||||
XMVECTOR XMLoadUIco4(__in CONST XMUICO4* pSource);
|
||||
XMVECTOR XMLoadXDecN4(__in CONST XMXDECN4* pSource);
|
||||
XMVECTOR XMLoadXDec4(__in CONST XMXDEC4* pSource);
|
||||
XMVECTOR XMLoadDecN4(__in CONST XMDECN4* pSource);
|
||||
XMVECTOR XMLoadDec4(__in CONST XMDEC4* pSource);
|
||||
XMVECTOR XMLoadUDecN4(__in CONST XMUDECN4* pSource);
|
||||
XMVECTOR XMLoadUDec4(__in CONST XMUDEC4* pSource);
|
||||
XMVECTOR XMLoadByteN4(__in CONST XMBYTEN4* pSource);
|
||||
XMVECTOR XMLoadByte4(__in CONST XMBYTE4* pSource);
|
||||
XMVECTOR XMLoadUByteN4(__in CONST XMUBYTEN4* pSource);
|
||||
XMVECTOR XMLoadUByte4(__in CONST XMUBYTE4* pSource);
|
||||
XMVECTOR XMLoadUNibble4(__in CONST XMUNIBBLE4* pSource);
|
||||
XMVECTOR XMLoadU555(__in CONST XMU555* pSource);
|
||||
XMVECTOR XMLoadColor(__in CONST XMCOLOR* pSource);
|
||||
XMVECTOR XMLoadInt4(_In_count_c_(4) CONST UINT* pSource);
|
||||
XMVECTOR XMLoadInt4A(_In_count_c_(4) CONST UINT* pSource);
|
||||
XMVECTOR XMLoadFloat4(_In_ CONST XMFLOAT4* pSource);
|
||||
XMVECTOR XMLoadFloat4A(_In_ CONST XMFLOAT4A* pSource);
|
||||
XMVECTOR XMLoadHalf4(_In_ CONST XMHALF4* pSource);
|
||||
XMVECTOR XMLoadShortN4(_In_ CONST XMSHORTN4* pSource);
|
||||
XMVECTOR XMLoadShort4(_In_ CONST XMSHORT4* pSource);
|
||||
XMVECTOR XMLoadUShortN4(_In_ CONST XMUSHORTN4* pSource);
|
||||
XMVECTOR XMLoadUShort4(_In_ CONST XMUSHORT4* pSource);
|
||||
XMVECTOR XMLoadXIcoN4(_In_ CONST XMXICON4* pSource);
|
||||
XMVECTOR XMLoadXIco4(_In_ CONST XMXICO4* pSource);
|
||||
XMVECTOR XMLoadIcoN4(_In_ CONST XMICON4* pSource);
|
||||
XMVECTOR XMLoadIco4(_In_ CONST XMICO4* pSource);
|
||||
XMVECTOR XMLoadUIcoN4(_In_ CONST XMUICON4* pSource);
|
||||
XMVECTOR XMLoadUIco4(_In_ CONST XMUICO4* pSource);
|
||||
XMVECTOR XMLoadXDecN4(_In_ CONST XMXDECN4* pSource);
|
||||
XMVECTOR XMLoadXDec4(_In_ CONST XMXDEC4* pSource);
|
||||
XMVECTOR XMLoadDecN4(_In_ CONST XMDECN4* pSource);
|
||||
XMVECTOR XMLoadDec4(_In_ CONST XMDEC4* pSource);
|
||||
XMVECTOR XMLoadUDecN4(_In_ CONST XMUDECN4* pSource);
|
||||
XMVECTOR XMLoadUDec4(_In_ CONST XMUDEC4* pSource);
|
||||
XMVECTOR XMLoadByteN4(_In_ CONST XMBYTEN4* pSource);
|
||||
XMVECTOR XMLoadByte4(_In_ CONST XMBYTE4* pSource);
|
||||
XMVECTOR XMLoadUByteN4(_In_ CONST XMUBYTEN4* pSource);
|
||||
XMVECTOR XMLoadUByte4(_In_ CONST XMUBYTE4* pSource);
|
||||
XMVECTOR XMLoadUNibble4(_In_ CONST XMUNIBBLE4* pSource);
|
||||
XMVECTOR XMLoadU555(_In_ CONST XMU555* pSource);
|
||||
XMVECTOR XMLoadColor(_In_ CONST XMCOLOR* pSource);
|
||||
|
||||
XMMATRIX XMLoadFloat3x3(__in CONST XMFLOAT3X3* pSource);
|
||||
XMMATRIX XMLoadFloat4x3(__in CONST XMFLOAT4X3* pSource);
|
||||
XMMATRIX XMLoadFloat4x3A(__in CONST XMFLOAT4X3A* pSource);
|
||||
XMMATRIX XMLoadFloat4x4(__in CONST XMFLOAT4X4* pSource);
|
||||
XMMATRIX XMLoadFloat4x4A(__in CONST XMFLOAT4X4A* pSource);
|
||||
XMMATRIX XMLoadFloat3x3(_In_ CONST XMFLOAT3X3* pSource);
|
||||
XMMATRIX XMLoadFloat4x3(_In_ CONST XMFLOAT4X3* pSource);
|
||||
XMMATRIX XMLoadFloat4x3A(_In_ CONST XMFLOAT4X3A* pSource);
|
||||
XMMATRIX XMLoadFloat4x4(_In_ CONST XMFLOAT4X4* pSource);
|
||||
XMMATRIX XMLoadFloat4x4A(_In_ CONST XMFLOAT4X4A* pSource);
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
@ -1925,74 +1991,74 @@ XMMATRIX XMLoadFloat4x4A(__in CONST XMFLOAT4X4A* pSource);
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
VOID XMStoreInt(__out UINT* pDestination, FXMVECTOR V);
|
||||
VOID XMStoreFloat(__out FLOAT* pDestination, FXMVECTOR V);
|
||||
VOID XMStoreInt(_Out_ UINT* pDestination, FXMVECTOR V);
|
||||
VOID XMStoreFloat(_Out_ FLOAT* pDestination, FXMVECTOR V);
|
||||
|
||||
VOID XMStoreInt2(__out_ecount(2) UINT* pDestination, FXMVECTOR V);
|
||||
VOID XMStoreInt2A(__out_ecount(2) UINT* pDestination, FXMVECTOR V);
|
||||
VOID XMStoreFloat2(__out XMFLOAT2* pDestination, FXMVECTOR V);
|
||||
VOID XMStoreFloat2A(__out XMFLOAT2A* pDestination, FXMVECTOR V);
|
||||
VOID XMStoreHalf2(__out XMHALF2* pDestination, FXMVECTOR V);
|
||||
VOID XMStoreShortN2(__out XMSHORTN2* pDestination, FXMVECTOR V);
|
||||
VOID XMStoreShort2(__out XMSHORT2* pDestination, FXMVECTOR V);
|
||||
VOID XMStoreUShortN2(__out XMUSHORTN2* pDestination, FXMVECTOR V);
|
||||
VOID XMStoreUShort2(__out XMUSHORT2* pDestination, FXMVECTOR V);
|
||||
VOID XMStoreInt2(_Out_cap_c_(2) UINT* pDestination, FXMVECTOR V);
|
||||
VOID XMStoreInt2A(_Out_cap_c_(2) UINT* pDestination, FXMVECTOR V);
|
||||
VOID XMStoreFloat2(_Out_ XMFLOAT2* pDestination, FXMVECTOR V);
|
||||
VOID XMStoreFloat2A(_Out_ XMFLOAT2A* pDestination, FXMVECTOR V);
|
||||
VOID XMStoreHalf2(_Out_ XMHALF2* pDestination, FXMVECTOR V);
|
||||
VOID XMStoreShortN2(_Out_ XMSHORTN2* pDestination, FXMVECTOR V);
|
||||
VOID XMStoreShort2(_Out_ XMSHORT2* pDestination, FXMVECTOR V);
|
||||
VOID XMStoreUShortN2(_Out_ XMUSHORTN2* pDestination, FXMVECTOR V);
|
||||
VOID XMStoreUShort2(_Out_ XMUSHORT2* pDestination, FXMVECTOR V);
|
||||
|
||||
VOID XMStoreInt3(__out_ecount(3) UINT* pDestination, FXMVECTOR V);
|
||||
VOID XMStoreInt3A(__out_ecount(3) UINT* pDestination, FXMVECTOR V);
|
||||
VOID XMStoreFloat3(__out XMFLOAT3* pDestination, FXMVECTOR V);
|
||||
VOID XMStoreFloat3A(__out XMFLOAT3A* pDestination, FXMVECTOR V);
|
||||
VOID XMStoreHenDN3(__out XMHENDN3* pDestination, FXMVECTOR V);
|
||||
VOID XMStoreHenD3(__out XMHEND3* pDestination, FXMVECTOR V);
|
||||
VOID XMStoreUHenDN3(__out XMUHENDN3* pDestination, FXMVECTOR V);
|
||||
VOID XMStoreUHenD3(__out XMUHEND3* pDestination, FXMVECTOR V);
|
||||
VOID XMStoreDHenN3(__out XMDHENN3* pDestination, FXMVECTOR V);
|
||||
VOID XMStoreDHen3(__out XMDHEN3* pDestination, FXMVECTOR V);
|
||||
VOID XMStoreUDHenN3(__out XMUDHENN3* pDestination, FXMVECTOR V);
|
||||
VOID XMStoreUDHen3(__out XMUDHEN3* pDestination, FXMVECTOR V);
|
||||
VOID XMStoreU565(__out XMU565* pDestination, FXMVECTOR V);
|
||||
VOID XMStoreFloat3PK(__out XMFLOAT3PK* pDestination, FXMVECTOR V);
|
||||
VOID XMStoreFloat3SE(__out XMFLOAT3SE* pDestination, FXMVECTOR V);
|
||||
VOID XMStoreInt3(_Out_cap_c_(3) UINT* pDestination, FXMVECTOR V);
|
||||
VOID XMStoreInt3A(_Out_cap_c_(3) UINT* pDestination, FXMVECTOR V);
|
||||
VOID XMStoreFloat3(_Out_ XMFLOAT3* pDestination, FXMVECTOR V);
|
||||
VOID XMStoreFloat3A(_Out_ XMFLOAT3A* pDestination, FXMVECTOR V);
|
||||
VOID XMStoreHenDN3(_Out_ XMHENDN3* pDestination, FXMVECTOR V);
|
||||
VOID XMStoreHenD3(_Out_ XMHEND3* pDestination, FXMVECTOR V);
|
||||
VOID XMStoreUHenDN3(_Out_ XMUHENDN3* pDestination, FXMVECTOR V);
|
||||
VOID XMStoreUHenD3(_Out_ XMUHEND3* pDestination, FXMVECTOR V);
|
||||
VOID XMStoreDHenN3(_Out_ XMDHENN3* pDestination, FXMVECTOR V);
|
||||
VOID XMStoreDHen3(_Out_ XMDHEN3* pDestination, FXMVECTOR V);
|
||||
VOID XMStoreUDHenN3(_Out_ XMUDHENN3* pDestination, FXMVECTOR V);
|
||||
VOID XMStoreUDHen3(_Out_ XMUDHEN3* pDestination, FXMVECTOR V);
|
||||
VOID XMStoreU565(_Out_ XMU565* pDestination, FXMVECTOR V);
|
||||
VOID XMStoreFloat3PK(_Out_ XMFLOAT3PK* pDestination, FXMVECTOR V);
|
||||
VOID XMStoreFloat3SE(_Out_ XMFLOAT3SE* pDestination, FXMVECTOR V);
|
||||
|
||||
VOID XMStoreInt4(__out_ecount(4) UINT* pDestination, FXMVECTOR V);
|
||||
VOID XMStoreInt4A(__out_ecount(4) UINT* pDestination, FXMVECTOR V);
|
||||
VOID XMStoreInt4NC(__out UINT* pDestination, FXMVECTOR V);
|
||||
VOID XMStoreFloat4(__out XMFLOAT4* pDestination, FXMVECTOR V);
|
||||
VOID XMStoreFloat4A(__out XMFLOAT4A* pDestination, FXMVECTOR V);
|
||||
VOID XMStoreFloat4NC(__out XMFLOAT4* pDestination, FXMVECTOR V);
|
||||
VOID XMStoreHalf4(__out XMHALF4* pDestination, FXMVECTOR V);
|
||||
VOID XMStoreShortN4(__out XMSHORTN4* pDestination, FXMVECTOR V);
|
||||
VOID XMStoreShort4(__out XMSHORT4* pDestination, FXMVECTOR V);
|
||||
VOID XMStoreUShortN4(__out XMUSHORTN4* pDestination, FXMVECTOR V);
|
||||
VOID XMStoreUShort4(__out XMUSHORT4* pDestination, FXMVECTOR V);
|
||||
VOID XMStoreXIcoN4(__out XMXICON4* pDestination, FXMVECTOR V);
|
||||
VOID XMStoreXIco4(__out XMXICO4* pDestination, FXMVECTOR V);
|
||||
VOID XMStoreIcoN4(__out XMICON4* pDestination, FXMVECTOR V);
|
||||
VOID XMStoreIco4(__out XMICO4* pDestination, FXMVECTOR V);
|
||||
VOID XMStoreUIcoN4(__out XMUICON4* pDestination, FXMVECTOR V);
|
||||
VOID XMStoreUIco4(__out XMUICO4* pDestination, FXMVECTOR V);
|
||||
VOID XMStoreXDecN4(__out XMXDECN4* pDestination, FXMVECTOR V);
|
||||
VOID XMStoreXDec4(__out XMXDEC4* pDestination, FXMVECTOR V);
|
||||
VOID XMStoreDecN4(__out XMDECN4* pDestination, FXMVECTOR V);
|
||||
VOID XMStoreDec4(__out XMDEC4* pDestination, FXMVECTOR V);
|
||||
VOID XMStoreUDecN4(__out XMUDECN4* pDestination, FXMVECTOR V);
|
||||
VOID XMStoreUDec4(__out XMUDEC4* pDestination, FXMVECTOR V);
|
||||
VOID XMStoreByteN4(__out XMBYTEN4* pDestination, FXMVECTOR V);
|
||||
VOID XMStoreByte4(__out XMBYTE4* pDestination, FXMVECTOR V);
|
||||
VOID XMStoreUByteN4(__out XMUBYTEN4* pDestination, FXMVECTOR V);
|
||||
VOID XMStoreUByte4(__out XMUBYTE4* pDestination, FXMVECTOR V);
|
||||
VOID XMStoreUNibble4(__out XMUNIBBLE4* pDestination, FXMVECTOR V);
|
||||
VOID XMStoreU555(__out XMU555* pDestination, FXMVECTOR V);
|
||||
VOID XMStoreColor(__out XMCOLOR* pDestination, FXMVECTOR V);
|
||||
VOID XMStoreInt4(_Out_cap_c_(4) UINT* pDestination, FXMVECTOR V);
|
||||
VOID XMStoreInt4A(_Out_cap_c_(4) UINT* pDestination, FXMVECTOR V);
|
||||
VOID XMStoreInt4NC(_Out_ UINT* pDestination, FXMVECTOR V);
|
||||
VOID XMStoreFloat4(_Out_ XMFLOAT4* pDestination, FXMVECTOR V);
|
||||
VOID XMStoreFloat4A(_Out_ XMFLOAT4A* pDestination, FXMVECTOR V);
|
||||
VOID XMStoreFloat4NC(_Out_ XMFLOAT4* pDestination, FXMVECTOR V);
|
||||
VOID XMStoreHalf4(_Out_ XMHALF4* pDestination, FXMVECTOR V);
|
||||
VOID XMStoreShortN4(_Out_ XMSHORTN4* pDestination, FXMVECTOR V);
|
||||
VOID XMStoreShort4(_Out_ XMSHORT4* pDestination, FXMVECTOR V);
|
||||
VOID XMStoreUShortN4(_Out_ XMUSHORTN4* pDestination, FXMVECTOR V);
|
||||
VOID XMStoreUShort4(_Out_ XMUSHORT4* pDestination, FXMVECTOR V);
|
||||
VOID XMStoreXIcoN4(_Out_ XMXICON4* pDestination, FXMVECTOR V);
|
||||
VOID XMStoreXIco4(_Out_ XMXICO4* pDestination, FXMVECTOR V);
|
||||
VOID XMStoreIcoN4(_Out_ XMICON4* pDestination, FXMVECTOR V);
|
||||
VOID XMStoreIco4(_Out_ XMICO4* pDestination, FXMVECTOR V);
|
||||
VOID XMStoreUIcoN4(_Out_ XMUICON4* pDestination, FXMVECTOR V);
|
||||
VOID XMStoreUIco4(_Out_ XMUICO4* pDestination, FXMVECTOR V);
|
||||
VOID XMStoreXDecN4(_Out_ XMXDECN4* pDestination, FXMVECTOR V);
|
||||
VOID XMStoreXDec4(_Out_ XMXDEC4* pDestination, FXMVECTOR V);
|
||||
VOID XMStoreDecN4(_Out_ XMDECN4* pDestination, FXMVECTOR V);
|
||||
VOID XMStoreDec4(_Out_ XMDEC4* pDestination, FXMVECTOR V);
|
||||
VOID XMStoreUDecN4(_Out_ XMUDECN4* pDestination, FXMVECTOR V);
|
||||
VOID XMStoreUDec4(_Out_ XMUDEC4* pDestination, FXMVECTOR V);
|
||||
VOID XMStoreByteN4(_Out_ XMBYTEN4* pDestination, FXMVECTOR V);
|
||||
VOID XMStoreByte4(_Out_ XMBYTE4* pDestination, FXMVECTOR V);
|
||||
VOID XMStoreUByteN4(_Out_ XMUBYTEN4* pDestination, FXMVECTOR V);
|
||||
VOID XMStoreUByte4(_Out_ XMUBYTE4* pDestination, FXMVECTOR V);
|
||||
VOID XMStoreUNibble4(_Out_ XMUNIBBLE4* pDestination, FXMVECTOR V);
|
||||
VOID XMStoreU555(_Out_ XMU555* pDestination, FXMVECTOR V);
|
||||
VOID XMStoreColor(_Out_ XMCOLOR* pDestination, FXMVECTOR V);
|
||||
|
||||
VOID XMStoreFloat3x3(__out XMFLOAT3X3* pDestination, CXMMATRIX M);
|
||||
VOID XMStoreFloat3x3NC(__out XMFLOAT3X3* pDestination, CXMMATRIX M);
|
||||
VOID XMStoreFloat4x3(__out XMFLOAT4X3* pDestination, CXMMATRIX M);
|
||||
VOID XMStoreFloat4x3A(__out XMFLOAT4X3A* pDestination, CXMMATRIX M);
|
||||
VOID XMStoreFloat4x3NC(__out XMFLOAT4X3* pDestination, CXMMATRIX M);
|
||||
VOID XMStoreFloat4x4(__out XMFLOAT4X4* pDestination, CXMMATRIX M);
|
||||
VOID XMStoreFloat4x4A(__out XMFLOAT4X4A* pDestination, CXMMATRIX M);
|
||||
VOID XMStoreFloat4x4NC(__out XMFLOAT4X4* pDestination, CXMMATRIX M);
|
||||
VOID XMStoreFloat3x3(_Out_ XMFLOAT3X3* pDestination, CXMMATRIX M);
|
||||
VOID XMStoreFloat3x3NC(_Out_ XMFLOAT3X3* pDestination, CXMMATRIX M);
|
||||
VOID XMStoreFloat4x3(_Out_ XMFLOAT4X3* pDestination, CXMMATRIX M);
|
||||
VOID XMStoreFloat4x3A(_Out_ XMFLOAT4X3A* pDestination, CXMMATRIX M);
|
||||
VOID XMStoreFloat4x3NC(_Out_ XMFLOAT4X3* pDestination, CXMMATRIX M);
|
||||
VOID XMStoreFloat4x4(_Out_ XMFLOAT4X4* pDestination, CXMMATRIX M);
|
||||
VOID XMStoreFloat4x4A(_Out_ XMFLOAT4X4A* pDestination, CXMMATRIX M);
|
||||
VOID XMStoreFloat4x4NC(_Out_ XMFLOAT4X4* pDestination, CXMMATRIX M);
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
@ -2004,9 +2070,9 @@ XMVECTOR XMVectorZero();
|
||||
XMVECTOR XMVectorSet(FLOAT x, FLOAT y, FLOAT z, FLOAT w);
|
||||
XMVECTOR XMVectorSetInt(UINT x, UINT y, UINT z, UINT w);
|
||||
XMVECTOR XMVectorReplicate(FLOAT Value);
|
||||
XMVECTOR XMVectorReplicatePtr(__in CONST FLOAT *pValue);
|
||||
XMVECTOR XMVectorReplicatePtr(_In_ CONST FLOAT *pValue);
|
||||
XMVECTOR XMVectorReplicateInt(UINT Value);
|
||||
XMVECTOR XMVectorReplicateIntPtr(__in CONST UINT *pValue);
|
||||
XMVECTOR XMVectorReplicateIntPtr(_In_ CONST UINT *pValue);
|
||||
XMVECTOR XMVectorTrueInt();
|
||||
XMVECTOR XMVectorFalseInt();
|
||||
XMVECTOR XMVectorSplatX(FXMVECTOR V);
|
||||
@ -2025,11 +2091,11 @@ FLOAT XMVectorGetY(FXMVECTOR V);
|
||||
FLOAT XMVectorGetZ(FXMVECTOR V);
|
||||
FLOAT XMVectorGetW(FXMVECTOR V);
|
||||
|
||||
VOID XMVectorGetByIndexPtr(__out FLOAT *f, FXMVECTOR V, UINT i);
|
||||
VOID XMVectorGetXPtr(__out FLOAT *x, FXMVECTOR V);
|
||||
VOID XMVectorGetYPtr(__out FLOAT *y, FXMVECTOR V);
|
||||
VOID XMVectorGetZPtr(__out FLOAT *z, FXMVECTOR V);
|
||||
VOID XMVectorGetWPtr(__out FLOAT *w, FXMVECTOR V);
|
||||
VOID XMVectorGetByIndexPtr(_Out_ FLOAT *f, FXMVECTOR V, UINT i);
|
||||
VOID XMVectorGetXPtr(_Out_ FLOAT *x, FXMVECTOR V);
|
||||
VOID XMVectorGetYPtr(_Out_ FLOAT *y, FXMVECTOR V);
|
||||
VOID XMVectorGetZPtr(_Out_ FLOAT *z, FXMVECTOR V);
|
||||
VOID XMVectorGetWPtr(_Out_ FLOAT *w, FXMVECTOR V);
|
||||
|
||||
UINT XMVectorGetIntByIndex(FXMVECTOR V,UINT i);
|
||||
UINT XMVectorGetIntX(FXMVECTOR V);
|
||||
@ -2037,11 +2103,11 @@ UINT XMVectorGetIntY(FXMVECTOR V);
|
||||
UINT XMVectorGetIntZ(FXMVECTOR V);
|
||||
UINT XMVectorGetIntW(FXMVECTOR V);
|
||||
|
||||
VOID XMVectorGetIntByIndexPtr(__out UINT *x,FXMVECTOR V, UINT i);
|
||||
VOID XMVectorGetIntXPtr(__out UINT *x, FXMVECTOR V);
|
||||
VOID XMVectorGetIntYPtr(__out UINT *y, FXMVECTOR V);
|
||||
VOID XMVectorGetIntZPtr(__out UINT *z, FXMVECTOR V);
|
||||
VOID XMVectorGetIntWPtr(__out UINT *w, FXMVECTOR V);
|
||||
VOID XMVectorGetIntByIndexPtr(_Out_ UINT *x,FXMVECTOR V, UINT i);
|
||||
VOID XMVectorGetIntXPtr(_Out_ UINT *x, FXMVECTOR V);
|
||||
VOID XMVectorGetIntYPtr(_Out_ UINT *y, FXMVECTOR V);
|
||||
VOID XMVectorGetIntZPtr(_Out_ UINT *z, FXMVECTOR V);
|
||||
VOID XMVectorGetIntWPtr(_Out_ UINT *w, FXMVECTOR V);
|
||||
|
||||
XMVECTOR XMVectorSetByIndex(FXMVECTOR V,FLOAT f,UINT i);
|
||||
XMVECTOR XMVectorSetX(FXMVECTOR V, FLOAT x);
|
||||
@ -2049,11 +2115,11 @@ XMVECTOR XMVectorSetY(FXMVECTOR V, FLOAT y);
|
||||
XMVECTOR XMVectorSetZ(FXMVECTOR V, FLOAT z);
|
||||
XMVECTOR XMVectorSetW(FXMVECTOR V, FLOAT w);
|
||||
|
||||
XMVECTOR XMVectorSetByIndexPtr(FXMVECTOR V, __in CONST FLOAT *f, UINT i);
|
||||
XMVECTOR XMVectorSetXPtr(FXMVECTOR V, __in CONST FLOAT *x);
|
||||
XMVECTOR XMVectorSetYPtr(FXMVECTOR V, __in CONST FLOAT *y);
|
||||
XMVECTOR XMVectorSetZPtr(FXMVECTOR V, __in CONST FLOAT *z);
|
||||
XMVECTOR XMVectorSetWPtr(FXMVECTOR V, __in CONST FLOAT *w);
|
||||
XMVECTOR XMVectorSetByIndexPtr(FXMVECTOR V, _In_ CONST FLOAT *f, UINT i);
|
||||
XMVECTOR XMVectorSetXPtr(FXMVECTOR V, _In_ CONST FLOAT *x);
|
||||
XMVECTOR XMVectorSetYPtr(FXMVECTOR V, _In_ CONST FLOAT *y);
|
||||
XMVECTOR XMVectorSetZPtr(FXMVECTOR V, _In_ CONST FLOAT *z);
|
||||
XMVECTOR XMVectorSetWPtr(FXMVECTOR V, _In_ CONST FLOAT *w);
|
||||
|
||||
XMVECTOR XMVectorSetIntByIndex(FXMVECTOR V, UINT x,UINT i);
|
||||
XMVECTOR XMVectorSetIntX(FXMVECTOR V, UINT x);
|
||||
@ -2061,11 +2127,11 @@ XMVECTOR XMVectorSetIntY(FXMVECTOR V, UINT y);
|
||||
XMVECTOR XMVectorSetIntZ(FXMVECTOR V, UINT z);
|
||||
XMVECTOR XMVectorSetIntW(FXMVECTOR V, UINT w);
|
||||
|
||||
XMVECTOR XMVectorSetIntByIndexPtr(FXMVECTOR V, __in CONST UINT *x, UINT i);
|
||||
XMVECTOR XMVectorSetIntXPtr(FXMVECTOR V, __in CONST UINT *x);
|
||||
XMVECTOR XMVectorSetIntYPtr(FXMVECTOR V, __in CONST UINT *y);
|
||||
XMVECTOR XMVectorSetIntZPtr(FXMVECTOR V, __in CONST UINT *z);
|
||||
XMVECTOR XMVectorSetIntWPtr(FXMVECTOR V, __in CONST UINT *w);
|
||||
XMVECTOR XMVectorSetIntByIndexPtr(FXMVECTOR V, _In_ CONST UINT *x, UINT i);
|
||||
XMVECTOR XMVectorSetIntXPtr(FXMVECTOR V, _In_ CONST UINT *x);
|
||||
XMVECTOR XMVectorSetIntYPtr(FXMVECTOR V, _In_ CONST UINT *y);
|
||||
XMVECTOR XMVectorSetIntZPtr(FXMVECTOR V, _In_ CONST UINT *z);
|
||||
XMVECTOR XMVectorSetIntWPtr(FXMVECTOR V, _In_ CONST UINT *w);
|
||||
|
||||
XMVECTOR XMVectorPermuteControl(UINT ElementIndex0, UINT ElementIndex1, UINT ElementIndex2, UINT ElementIndex3);
|
||||
XMVECTOR XMVectorPermute(FXMVECTOR V1, FXMVECTOR V2, FXMVECTOR Control);
|
||||
@ -2085,20 +2151,20 @@ XMVECTOR XMVectorInsert(FXMVECTOR VD, FXMVECTOR VS, UINT VSLeftRotateElements,
|
||||
#endif
|
||||
|
||||
XMVECTOR XMVectorEqual(FXMVECTOR V1, FXMVECTOR V2);
|
||||
XMVECTOR XMVectorEqualR(__out UINT* pCR, FXMVECTOR V1, FXMVECTOR V2);
|
||||
XMVECTOR XMVectorEqualR(_Out_ UINT* pCR, FXMVECTOR V1, FXMVECTOR V2);
|
||||
XMVECTOR XMVectorEqualInt(FXMVECTOR V1, FXMVECTOR V2);
|
||||
XMVECTOR XMVectorEqualIntR(__out UINT* pCR, FXMVECTOR V, FXMVECTOR V2);
|
||||
XMVECTOR XMVectorEqualIntR(_Out_ UINT* pCR, FXMVECTOR V, FXMVECTOR V2);
|
||||
XMVECTOR XMVectorNearEqual(FXMVECTOR V1, FXMVECTOR V2, FXMVECTOR Epsilon);
|
||||
XMVECTOR XMVectorNotEqual(FXMVECTOR V1, FXMVECTOR V2);
|
||||
XMVECTOR XMVectorNotEqualInt(FXMVECTOR V1, FXMVECTOR V2);
|
||||
XMVECTOR XMVectorGreater(FXMVECTOR V1, FXMVECTOR V2);
|
||||
XMVECTOR XMVectorGreaterR(__out UINT* pCR, FXMVECTOR V1, FXMVECTOR V2);
|
||||
XMVECTOR XMVectorGreaterR(_Out_ UINT* pCR, FXMVECTOR V1, FXMVECTOR V2);
|
||||
XMVECTOR XMVectorGreaterOrEqual(FXMVECTOR V1, FXMVECTOR V2);
|
||||
XMVECTOR XMVectorGreaterOrEqualR(__out UINT* pCR, FXMVECTOR V1, FXMVECTOR V2);
|
||||
XMVECTOR XMVectorGreaterOrEqualR(_Out_ UINT* pCR, FXMVECTOR V1, FXMVECTOR V2);
|
||||
XMVECTOR XMVectorLess(FXMVECTOR V1, FXMVECTOR V2);
|
||||
XMVECTOR XMVectorLessOrEqual(FXMVECTOR V1, FXMVECTOR V2);
|
||||
XMVECTOR XMVectorInBounds(FXMVECTOR V, FXMVECTOR Bounds);
|
||||
XMVECTOR XMVectorInBoundsR(__out UINT* pCR, FXMVECTOR V, FXMVECTOR Bounds);
|
||||
XMVECTOR XMVectorInBoundsR(_Out_ UINT* pCR, FXMVECTOR V, FXMVECTOR Bounds);
|
||||
|
||||
XMVECTOR XMVectorIsNaN(FXMVECTOR V);
|
||||
XMVECTOR XMVectorIsInfinite(FXMVECTOR V);
|
||||
@ -2125,6 +2191,7 @@ XMVECTOR XMVectorSubtract(FXMVECTOR V1, FXMVECTOR V2);
|
||||
XMVECTOR XMVectorSubtractAngles(FXMVECTOR V1, FXMVECTOR V2);
|
||||
XMVECTOR XMVectorMultiply(FXMVECTOR V1, FXMVECTOR V2);
|
||||
XMVECTOR XMVectorMultiplyAdd(FXMVECTOR V1, FXMVECTOR V2, FXMVECTOR V3);
|
||||
XMVECTOR XMVectorDivide(FXMVECTOR V1, FXMVECTOR V2);
|
||||
XMVECTOR XMVectorNegativeMultiplySubtract(FXMVECTOR V1, FXMVECTOR V2, FXMVECTOR V3);
|
||||
XMVECTOR XMVectorScale(FXMVECTOR V, FLOAT ScaleFactor);
|
||||
XMVECTOR XMVectorReciprocalEst(FXMVECTOR V);
|
||||
@ -2146,8 +2213,8 @@ XMVECTOR XMVectorSin(FXMVECTOR V);
|
||||
XMVECTOR XMVectorSinEst(FXMVECTOR V);
|
||||
XMVECTOR XMVectorCos(FXMVECTOR V);
|
||||
XMVECTOR XMVectorCosEst(FXMVECTOR V);
|
||||
VOID XMVectorSinCos(__out XMVECTOR* pSin, __out XMVECTOR* pCos, FXMVECTOR V);
|
||||
VOID XMVectorSinCosEst(__out XMVECTOR* pSin, __out XMVECTOR* pCos, FXMVECTOR V);
|
||||
VOID XMVectorSinCos(_Out_ XMVECTOR* pSin, _Out_ XMVECTOR* pCos, FXMVECTOR V);
|
||||
VOID XMVectorSinCosEst(_Out_ XMVECTOR* pSin, _Out_ XMVECTOR* pCos, FXMVECTOR V);
|
||||
XMVECTOR XMVectorTan(FXMVECTOR V);
|
||||
XMVECTOR XMVectorTanEst(FXMVECTOR V);
|
||||
XMVECTOR XMVectorSinH(FXMVECTOR V);
|
||||
@ -2220,24 +2287,24 @@ XMVECTOR XMVector2AngleBetweenVectors(FXMVECTOR V1, FXMVECTOR V2);
|
||||
XMVECTOR XMVector2LinePointDistance(FXMVECTOR LinePoint1, FXMVECTOR LinePoint2, FXMVECTOR Point);
|
||||
XMVECTOR XMVector2IntersectLine(FXMVECTOR Line1Point1, FXMVECTOR Line1Point2, FXMVECTOR Line2Point1, CXMVECTOR Line2Point2);
|
||||
XMVECTOR XMVector2Transform(FXMVECTOR V, CXMMATRIX M);
|
||||
XMFLOAT4* XMVector2TransformStream(__out_bcount(sizeof(XMFLOAT4)+OutputStride*(VectorCount-1)) XMFLOAT4* pOutputStream,
|
||||
__in UINT OutputStride,
|
||||
__in_bcount(sizeof(XMFLOAT2)+InputStride*(VectorCount-1)) CONST XMFLOAT2* pInputStream,
|
||||
__in UINT InputStride, __in UINT VectorCount, CXMMATRIX M);
|
||||
XMFLOAT4* XMVector2TransformStreamNC(__out_bcount(sizeof(XMFLOAT4)+OutputStride*(VectorCount-1)) XMFLOAT4* pOutputStream,
|
||||
__in UINT OutputStride,
|
||||
__in_bcount(sizeof(XMFLOAT2)+InputStride*(VectorCount-1)) CONST XMFLOAT2* pInputStream,
|
||||
__in UINT InputStride, __in UINT VectorCount, CXMMATRIX M);
|
||||
XMFLOAT4* XMVector2TransformStream(_Out_bytecap_x_(sizeof(XMFLOAT4)+OutputStride*(VectorCount-1)) XMFLOAT4* pOutputStream,
|
||||
_In_ UINT OutputStride,
|
||||
_In_bytecount_x_(sizeof(XMFLOAT2)+InputStride*(VectorCount-1)) CONST XMFLOAT2* pInputStream,
|
||||
_In_ UINT InputStride, _In_ UINT VectorCount, CXMMATRIX M);
|
||||
XMFLOAT4* XMVector2TransformStreamNC(_Out_bytecap_x_(sizeof(XMFLOAT4)+OutputStride*(VectorCount-1)) XMFLOAT4* pOutputStream,
|
||||
_In_ UINT OutputStride,
|
||||
_In_bytecount_x_(sizeof(XMFLOAT2)+InputStride*(VectorCount-1)) CONST XMFLOAT2* pInputStream,
|
||||
_In_ UINT InputStride, _In_ UINT VectorCount, CXMMATRIX M);
|
||||
XMVECTOR XMVector2TransformCoord(FXMVECTOR V, CXMMATRIX M);
|
||||
XMFLOAT2* XMVector2TransformCoordStream(__out_bcount(sizeof(XMFLOAT2)+OutputStride*(VectorCount-1)) XMFLOAT2* pOutputStream,
|
||||
__in UINT OutputStride,
|
||||
__in_bcount(sizeof(XMFLOAT2)+InputStride*(VectorCount-1)) CONST XMFLOAT2* pInputStream,
|
||||
__in UINT InputStride, __in UINT VectorCount, CXMMATRIX M);
|
||||
XMFLOAT2* XMVector2TransformCoordStream(_Out_bytecap_x_(sizeof(XMFLOAT2)+OutputStride*(VectorCount-1)) XMFLOAT2* pOutputStream,
|
||||
_In_ UINT OutputStride,
|
||||
_In_bytecount_x_(sizeof(XMFLOAT2)+InputStride*(VectorCount-1)) CONST XMFLOAT2* pInputStream,
|
||||
_In_ UINT InputStride, _In_ UINT VectorCount, CXMMATRIX M);
|
||||
XMVECTOR XMVector2TransformNormal(FXMVECTOR V, CXMMATRIX M);
|
||||
XMFLOAT2* XMVector2TransformNormalStream(__out_bcount(sizeof(XMFLOAT2)+OutputStride*(VectorCount-1)) XMFLOAT2* pOutputStream,
|
||||
__in UINT OutputStride,
|
||||
__in_bcount(sizeof(XMFLOAT2)+InputStride*(VectorCount-1)) CONST XMFLOAT2* pInputStream,
|
||||
__in UINT InputStride, __in UINT VectorCount, CXMMATRIX M);
|
||||
XMFLOAT2* XMVector2TransformNormalStream(_Out_bytecap_x_(sizeof(XMFLOAT2)+OutputStride*(VectorCount-1)) XMFLOAT2* pOutputStream,
|
||||
_In_ UINT OutputStride,
|
||||
_In_bytecount_x_(sizeof(XMFLOAT2)+InputStride*(VectorCount-1)) CONST XMFLOAT2* pInputStream,
|
||||
_In_ UINT InputStride, _In_ UINT VectorCount, CXMMATRIX M);
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
@ -2284,42 +2351,42 @@ XMVECTOR XMVector3AngleBetweenNormalsEst(FXMVECTOR N1, FXMVECTOR N2);
|
||||
XMVECTOR XMVector3AngleBetweenNormals(FXMVECTOR N1, FXMVECTOR N2);
|
||||
XMVECTOR XMVector3AngleBetweenVectors(FXMVECTOR V1, FXMVECTOR V2);
|
||||
XMVECTOR XMVector3LinePointDistance(FXMVECTOR LinePoint1, FXMVECTOR LinePoint2, FXMVECTOR Point);
|
||||
VOID XMVector3ComponentsFromNormal(__out XMVECTOR* pParallel, __out XMVECTOR* pPerpendicular, FXMVECTOR V, FXMVECTOR Normal);
|
||||
VOID XMVector3ComponentsFromNormal(_Out_ XMVECTOR* pParallel, _Out_ XMVECTOR* pPerpendicular, FXMVECTOR V, FXMVECTOR Normal);
|
||||
XMVECTOR XMVector3Rotate(FXMVECTOR V, FXMVECTOR RotationQuaternion);
|
||||
XMVECTOR XMVector3InverseRotate(FXMVECTOR V, FXMVECTOR RotationQuaternion);
|
||||
XMVECTOR XMVector3Transform(FXMVECTOR V, CXMMATRIX M);
|
||||
XMFLOAT4* XMVector3TransformStream(__out_bcount(sizeof(XMFLOAT4)+OutputStride*(VectorCount-1)) XMFLOAT4* pOutputStream,
|
||||
__in UINT OutputStride,
|
||||
__in_bcount(sizeof(XMFLOAT3)+InputStride*(VectorCount-1)) CONST XMFLOAT3* pInputStream,
|
||||
__in UINT InputStride, __in UINT VectorCount, CXMMATRIX M);
|
||||
XMFLOAT4* XMVector3TransformStreamNC(__out_bcount(sizeof(XMFLOAT4)+OutputStride*(VectorCount-1)) XMFLOAT4* pOutputStream,
|
||||
__in UINT OutputStride,
|
||||
__in_bcount(sizeof(XMFLOAT3)+InputStride*(VectorCount-1)) CONST XMFLOAT3* pInputStream,
|
||||
__in UINT InputStride, __in UINT VectorCount, CXMMATRIX M);
|
||||
XMFLOAT4* XMVector3TransformStream(_Out_bytecap_x_(sizeof(XMFLOAT4)+OutputStride*(VectorCount-1)) XMFLOAT4* pOutputStream,
|
||||
_In_ UINT OutputStride,
|
||||
_In_bytecount_x_(sizeof(XMFLOAT3)+InputStride*(VectorCount-1)) CONST XMFLOAT3* pInputStream,
|
||||
_In_ UINT InputStride, _In_ UINT VectorCount, CXMMATRIX M);
|
||||
XMFLOAT4* XMVector3TransformStreamNC(_Out_bytecap_x_(sizeof(XMFLOAT4)+OutputStride*(VectorCount-1)) XMFLOAT4* pOutputStream,
|
||||
_In_ UINT OutputStride,
|
||||
_In_bytecount_x_(sizeof(XMFLOAT3)+InputStride*(VectorCount-1)) CONST XMFLOAT3* pInputStream,
|
||||
_In_ UINT InputStride, _In_ UINT VectorCount, CXMMATRIX M);
|
||||
XMVECTOR XMVector3TransformCoord(FXMVECTOR V, CXMMATRIX M);
|
||||
XMFLOAT3* XMVector3TransformCoordStream(__out_bcount(sizeof(XMFLOAT3)+OutputStride*(VectorCount-1)) XMFLOAT3* pOutputStream,
|
||||
__in UINT OutputStride,
|
||||
__in_bcount(sizeof(XMFLOAT3)+InputStride*(VectorCount-1)) CONST XMFLOAT3* pInputStream,
|
||||
__in UINT InputStride, __in UINT VectorCount, CXMMATRIX M);
|
||||
XMFLOAT3* XMVector3TransformCoordStream(_Out_bytecap_x_(sizeof(XMFLOAT3)+OutputStride*(VectorCount-1)) XMFLOAT3* pOutputStream,
|
||||
_In_ UINT OutputStride,
|
||||
_In_bytecount_x_(sizeof(XMFLOAT3)+InputStride*(VectorCount-1)) CONST XMFLOAT3* pInputStream,
|
||||
_In_ UINT InputStride, _In_ UINT VectorCount, CXMMATRIX M);
|
||||
XMVECTOR XMVector3TransformNormal(FXMVECTOR V, CXMMATRIX M);
|
||||
XMFLOAT3* XMVector3TransformNormalStream(__out_bcount(sizeof(XMFLOAT3)+OutputStride*(VectorCount-1)) XMFLOAT3* pOutputStream,
|
||||
__in UINT OutputStride,
|
||||
__in_bcount(sizeof(XMFLOAT3)+InputStride*(VectorCount-1)) CONST XMFLOAT3* pInputStream,
|
||||
__in UINT InputStride, __in UINT VectorCount, CXMMATRIX M);
|
||||
XMFLOAT3* XMVector3TransformNormalStream(_Out_bytecap_x_(sizeof(XMFLOAT3)+OutputStride*(VectorCount-1)) XMFLOAT3* pOutputStream,
|
||||
_In_ UINT OutputStride,
|
||||
_In_bytecount_x_(sizeof(XMFLOAT3)+InputStride*(VectorCount-1)) CONST XMFLOAT3* pInputStream,
|
||||
_In_ UINT InputStride, _In_ UINT VectorCount, CXMMATRIX M);
|
||||
XMVECTOR XMVector3Project(FXMVECTOR V, FLOAT ViewportX, FLOAT ViewportY, FLOAT ViewportWidth, FLOAT ViewportHeight, FLOAT ViewportMinZ, FLOAT ViewportMaxZ,
|
||||
CXMMATRIX Projection, CXMMATRIX View, CXMMATRIX World);
|
||||
XMFLOAT3* XMVector3ProjectStream(__out_bcount(sizeof(XMFLOAT3)+OutputStride*(VectorCount-1)) XMFLOAT3* pOutputStream,
|
||||
__in UINT OutputStride,
|
||||
__in_bcount(sizeof(XMFLOAT3)+InputStride*(VectorCount-1)) CONST XMFLOAT3* pInputStream,
|
||||
__in UINT InputStride, __in UINT VectorCount,
|
||||
XMFLOAT3* XMVector3ProjectStream(_Out_bytecap_x_(sizeof(XMFLOAT3)+OutputStride*(VectorCount-1)) XMFLOAT3* pOutputStream,
|
||||
_In_ UINT OutputStride,
|
||||
_In_bytecount_x_(sizeof(XMFLOAT3)+InputStride*(VectorCount-1)) CONST XMFLOAT3* pInputStream,
|
||||
_In_ UINT InputStride, _In_ UINT VectorCount,
|
||||
FLOAT ViewportX, FLOAT ViewportY, FLOAT ViewportWidth, FLOAT ViewportHeight, FLOAT ViewportMinZ, FLOAT ViewportMaxZ,
|
||||
CXMMATRIX Projection, CXMMATRIX View, CXMMATRIX World);
|
||||
XMVECTOR XMVector3Unproject(FXMVECTOR V, FLOAT ViewportX, FLOAT ViewportY, FLOAT ViewportWidth, FLOAT ViewportHeight, FLOAT ViewportMinZ, FLOAT ViewportMaxZ,
|
||||
CXMMATRIX Projection, CXMMATRIX View, CXMMATRIX World);
|
||||
XMFLOAT3* XMVector3UnprojectStream(__out_bcount(sizeof(XMFLOAT3)+OutputStride*(VectorCount-1)) XMFLOAT3* pOutputStream,
|
||||
__in UINT OutputStride,
|
||||
__in_bcount(sizeof(XMFLOAT3)+InputStride*(VectorCount-1)) CONST XMFLOAT3* pInputStream,
|
||||
__in UINT InputStride, __in UINT VectorCount,
|
||||
XMFLOAT3* XMVector3UnprojectStream(_Out_bytecap_x_(sizeof(XMFLOAT3)+OutputStride*(VectorCount-1)) XMFLOAT3* pOutputStream,
|
||||
_In_ UINT OutputStride,
|
||||
_In_bytecount_x_(sizeof(XMFLOAT3)+InputStride*(VectorCount-1)) CONST XMFLOAT3* pInputStream,
|
||||
_In_ UINT InputStride, _In_ UINT VectorCount,
|
||||
FLOAT ViewportX, FLOAT ViewportY, FLOAT ViewportWidth, FLOAT ViewportHeight, FLOAT ViewportMinZ, FLOAT ViewportMaxZ,
|
||||
CXMMATRIX Projection, CXMMATRIX View, CXMMATRIX World);
|
||||
|
||||
@ -2367,10 +2434,10 @@ XMVECTOR XMVector4AngleBetweenNormalsEst(FXMVECTOR N1, FXMVECTOR N2);
|
||||
XMVECTOR XMVector4AngleBetweenNormals(FXMVECTOR N1, FXMVECTOR N2);
|
||||
XMVECTOR XMVector4AngleBetweenVectors(FXMVECTOR V1, FXMVECTOR V2);
|
||||
XMVECTOR XMVector4Transform(FXMVECTOR V, CXMMATRIX M);
|
||||
XMFLOAT4* XMVector4TransformStream(__out_bcount(sizeof(XMFLOAT4)+OutputStride*(VectorCount-1)) XMFLOAT4* pOutputStream,
|
||||
__in UINT OutputStride,
|
||||
__in_bcount(sizeof(XMFLOAT4)+InputStride*(VectorCount-1)) CONST XMFLOAT4* pInputStream,
|
||||
__in UINT InputStride, __in UINT VectorCount, CXMMATRIX M);
|
||||
XMFLOAT4* XMVector4TransformStream(_Out_bytecap_x_(sizeof(XMFLOAT4)+OutputStride*(VectorCount-1)) XMFLOAT4* pOutputStream,
|
||||
_In_ UINT OutputStride,
|
||||
_In_bytecount_x_(sizeof(XMFLOAT4)+InputStride*(VectorCount-1)) CONST XMFLOAT4* pInputStream,
|
||||
_In_ UINT InputStride, _In_ UINT VectorCount, CXMMATRIX M);
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
@ -2385,9 +2452,9 @@ BOOL XMMatrixIsIdentity(CXMMATRIX M);
|
||||
XMMATRIX XMMatrixMultiply(CXMMATRIX M1, CXMMATRIX M2);
|
||||
XMMATRIX XMMatrixMultiplyTranspose(CXMMATRIX M1, CXMMATRIX M2);
|
||||
XMMATRIX XMMatrixTranspose(CXMMATRIX M);
|
||||
XMMATRIX XMMatrixInverse(__out XMVECTOR* pDeterminant, CXMMATRIX M);
|
||||
XMMATRIX XMMatrixInverse(_Out_ XMVECTOR* pDeterminant, CXMMATRIX M);
|
||||
XMVECTOR XMMatrixDeterminant(CXMMATRIX M);
|
||||
BOOL XMMatrixDecompose(__out XMVECTOR *outScale, __out XMVECTOR *outRotQuat, __out XMVECTOR *outTrans, CXMMATRIX M);
|
||||
BOOL XMMatrixDecompose(_Out_ XMVECTOR *outScale, _Out_ XMVECTOR *outRotQuat, _Out_ XMVECTOR *outTrans, CXMMATRIX M);
|
||||
|
||||
XMMATRIX XMMatrixIdentity();
|
||||
XMMATRIX XMMatrixSet(FLOAT m00, FLOAT m01, FLOAT m02, FLOAT m03,
|
||||
@ -2458,7 +2525,7 @@ XMVECTOR XMQuaternionSlerp(FXMVECTOR Q0, FXMVECTOR Q1, FLOAT t);
|
||||
XMVECTOR XMQuaternionSlerpV(FXMVECTOR Q0, FXMVECTOR Q1, FXMVECTOR T);
|
||||
XMVECTOR XMQuaternionSquad(FXMVECTOR Q0, FXMVECTOR Q1, FXMVECTOR Q2, CXMVECTOR Q3, FLOAT t);
|
||||
XMVECTOR XMQuaternionSquadV(FXMVECTOR Q0, FXMVECTOR Q1, FXMVECTOR Q2, CXMVECTOR Q3, CXMVECTOR T);
|
||||
VOID XMQuaternionSquadSetup(__out XMVECTOR* pA, __out XMVECTOR* pB, __out XMVECTOR* pC, FXMVECTOR Q0, FXMVECTOR Q1, FXMVECTOR Q2, CXMVECTOR Q3);
|
||||
VOID XMQuaternionSquadSetup(_Out_ XMVECTOR* pA, _Out_ XMVECTOR* pB, _Out_ XMVECTOR* pC, FXMVECTOR Q0, FXMVECTOR Q1, FXMVECTOR Q2, CXMVECTOR Q3);
|
||||
XMVECTOR XMQuaternionBaryCentric(FXMVECTOR Q0, FXMVECTOR Q1, FXMVECTOR Q2, FLOAT f, FLOAT g);
|
||||
XMVECTOR XMQuaternionBaryCentricV(FXMVECTOR Q0, FXMVECTOR Q1, FXMVECTOR Q2, CXMVECTOR F, CXMVECTOR G);
|
||||
|
||||
@ -2469,7 +2536,7 @@ XMVECTOR XMQuaternionRotationNormal(FXMVECTOR NormalAxis, FLOAT Angle);
|
||||
XMVECTOR XMQuaternionRotationAxis(FXMVECTOR Axis, FLOAT Angle);
|
||||
XMVECTOR XMQuaternionRotationMatrix(CXMMATRIX M);
|
||||
|
||||
VOID XMQuaternionToAxisAngle(__out XMVECTOR* pAxis, __out FLOAT* pAngle, FXMVECTOR Q);
|
||||
VOID XMQuaternionToAxisAngle(_Out_ XMVECTOR* pAxis, _Out_ FLOAT* pAngle, FXMVECTOR Q);
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
@ -2490,12 +2557,12 @@ XMVECTOR XMPlaneDotNormal(FXMVECTOR P, FXMVECTOR V);
|
||||
XMVECTOR XMPlaneNormalizeEst(FXMVECTOR P);
|
||||
XMVECTOR XMPlaneNormalize(FXMVECTOR P);
|
||||
XMVECTOR XMPlaneIntersectLine(FXMVECTOR P, FXMVECTOR LinePoint1, FXMVECTOR LinePoint2);
|
||||
VOID XMPlaneIntersectPlane(__out XMVECTOR* pLinePoint1, __out XMVECTOR* pLinePoint2, FXMVECTOR P1, FXMVECTOR P2);
|
||||
VOID XMPlaneIntersectPlane(_Out_ XMVECTOR* pLinePoint1, _Out_ XMVECTOR* pLinePoint2, FXMVECTOR P1, FXMVECTOR P2);
|
||||
XMVECTOR XMPlaneTransform(FXMVECTOR P, CXMMATRIX M);
|
||||
XMFLOAT4* XMPlaneTransformStream(__out_bcount(sizeof(XMFLOAT4)+OutputStride*(PlaneCount-1)) XMFLOAT4* pOutputStream,
|
||||
__in UINT OutputStride,
|
||||
__in_bcount(sizeof(XMFLOAT4)+InputStride*(PlaneCount-1)) CONST XMFLOAT4* pInputStream,
|
||||
__in UINT InputStride, __in UINT PlaneCount, CXMMATRIX M);
|
||||
XMFLOAT4* XMPlaneTransformStream(_Out_bytecap_x_(sizeof(XMFLOAT4)+OutputStride*(PlaneCount-1)) XMFLOAT4* pOutputStream,
|
||||
_In_ UINT OutputStride,
|
||||
_In_bytecount_x_(sizeof(XMFLOAT4)+InputStride*(PlaneCount-1)) CONST XMFLOAT4* pInputStream,
|
||||
_In_ UINT InputStride, _In_ UINT PlaneCount, CXMMATRIX M);
|
||||
|
||||
XMVECTOR XMPlaneFromPointNormal(FXMVECTOR Point, FXMVECTOR Normal);
|
||||
XMVECTOR XMPlaneFromPoints(FXMVECTOR Point1, FXMVECTOR Point2, FXMVECTOR Point3);
|
||||
@ -2529,7 +2596,7 @@ XMVECTOR XMColorAdjustContrast(FXMVECTOR C, FLOAT Contrast);
|
||||
|
||||
BOOL XMVerifyCPUSupport();
|
||||
|
||||
VOID XMAssert(__in_z CONST CHAR* pExpression, __in_z CONST CHAR* pFileName, UINT LineNumber);
|
||||
VOID XMAssert(_In_z_ CONST CHAR* pExpression, _In_z_ CONST CHAR* pFileName, UINT LineNumber);
|
||||
|
||||
XMVECTOR XMFresnelTerm(FXMVECTOR CosIncidentAngle, FXMVECTOR RefractionIndex);
|
||||
|
||||
@ -2537,12 +2604,12 @@ BOOL XMScalarNearEqual(FLOAT S1, FLOAT S2, FLOAT Epsilon);
|
||||
FLOAT XMScalarModAngle(FLOAT Value);
|
||||
FLOAT XMScalarSin(FLOAT Value);
|
||||
FLOAT XMScalarCos(FLOAT Value);
|
||||
VOID XMScalarSinCos(__out FLOAT* pSin, __out FLOAT* pCos, FLOAT Value);
|
||||
VOID XMScalarSinCos(_Out_ FLOAT* pSin, _Out_ FLOAT* pCos, FLOAT Value);
|
||||
FLOAT XMScalarASin(FLOAT Value);
|
||||
FLOAT XMScalarACos(FLOAT Value);
|
||||
FLOAT XMScalarSinEst(FLOAT Value);
|
||||
FLOAT XMScalarCosEst(FLOAT Value);
|
||||
VOID XMScalarSinCosEst(__out FLOAT* pSin, __out FLOAT* pCos, FLOAT Value);
|
||||
VOID XMScalarSinCosEst(_Out_ FLOAT* pSin, _Out_ FLOAT* pCos, FLOAT Value);
|
||||
FLOAT XMScalarASinEst(FLOAT Value);
|
||||
FLOAT XMScalarACosEst(FLOAT Value);
|
||||
|
||||
|
@ -1882,11 +1882,11 @@ XMFINLINE XMVECTOR XMLoadXIcoN4
|
||||
XMASSERT(((pSource->v >> 20) & 0xFFFFFull) != 0x80000ull);
|
||||
XMASSERT(((pSource->v >> 40) & 0xFFFFFull) != 0x80000ull);
|
||||
|
||||
Element = (UINT)pSource->v & 0xFFFFF;
|
||||
Element = (UINT)(pSource->v & 0xFFFFF);
|
||||
V.vector4_f32[0] = (FLOAT)(INT)(Element | SignExtend[Element >> 19]) / 524287.0f;
|
||||
Element = (UINT)(pSource->v >> 20) & 0xFFFFF;
|
||||
Element = (UINT)((pSource->v >> 20) & 0xFFFFF);
|
||||
V.vector4_f32[1] = (FLOAT)(INT)(Element | SignExtend[Element >> 19]) / 524287.0f;
|
||||
Element = (UINT)(pSource->v >> 40) & 0xFFFFF;
|
||||
Element = (UINT)((pSource->v >> 40) & 0xFFFFF);
|
||||
V.vector4_f32[2] = (FLOAT)(INT)(Element | SignExtend[Element >> 19]) / 524287.0f;
|
||||
V.vector4_f32[3] = (FLOAT)(pSource->v >> 60) / 15.0f;
|
||||
|
||||
@ -1939,11 +1939,11 @@ XMFINLINE XMVECTOR XMLoadXIco4
|
||||
XMASSERT(((pSource->v >> 20) & 0xFFFFFull) != 0x80000ull);
|
||||
XMASSERT(((pSource->v >> 40) & 0xFFFFFull) != 0x80000ull);
|
||||
|
||||
Element = (UINT)pSource->v & 0xFFFFF;
|
||||
Element = (UINT)(pSource->v & 0xFFFFF);
|
||||
V.vector4_f32[0] = (FLOAT)(INT)(Element | SignExtend[Element >> 19]);
|
||||
Element = (UINT)(pSource->v >> 20) & 0xFFFFF;
|
||||
Element = (UINT)((pSource->v >> 20) & 0xFFFFF);
|
||||
V.vector4_f32[1] = (FLOAT)(INT)(Element | SignExtend[Element >> 19]);
|
||||
Element = (UINT)(pSource->v >> 40) & 0xFFFFF;
|
||||
Element = (UINT)((pSource->v >> 40) & 0xFFFFF);
|
||||
V.vector4_f32[2] = (FLOAT)(INT)(Element | SignExtend[Element >> 19]);
|
||||
V.vector4_f32[3] = (FLOAT)(pSource->v >> 60);
|
||||
|
||||
@ -2084,11 +2084,11 @@ XMFINLINE XMVECTOR XMLoadIcoN4
|
||||
|
||||
XMASSERT(pSource);
|
||||
|
||||
Element = (UINT)pSource->v & 0xFFFFF;
|
||||
Element = (UINT)(pSource->v & 0xFFFFF);
|
||||
V.vector4_f32[0] = (FLOAT)(INT)(Element | SignExtend[Element >> 19]) / 524287.0f;
|
||||
Element = (UINT)(pSource->v >> 20) & 0xFFFFF;
|
||||
Element = (UINT)((pSource->v >> 20) & 0xFFFFF);
|
||||
V.vector4_f32[1] = (FLOAT)(INT)(Element | SignExtend[Element >> 19]) / 524287.0f;
|
||||
Element = (UINT)(pSource->v >> 40) & 0xFFFFF;
|
||||
Element = (UINT)((pSource->v >> 40) & 0xFFFFF);
|
||||
V.vector4_f32[2] = (FLOAT)(INT)(Element | SignExtend[Element >> 19]) / 524287.0f;
|
||||
Element = (UINT)(pSource->v >> 60);
|
||||
V.vector4_f32[3] = (FLOAT)(INT)(Element | SignExtendW[Element >> 3]) / 7.0f;
|
||||
@ -2137,11 +2137,11 @@ XMFINLINE XMVECTOR XMLoadIco4
|
||||
|
||||
XMASSERT(pSource);
|
||||
|
||||
Element = (UINT)pSource->v & 0xFFFFF;
|
||||
Element = (UINT)(pSource->v & 0xFFFFF);
|
||||
V.vector4_f32[0] = (FLOAT)(INT)(Element | SignExtend[Element >> 19]);
|
||||
Element = (UINT)(pSource->v >> 20) & 0xFFFFF;
|
||||
Element = (UINT)((pSource->v >> 20) & 0xFFFFF);
|
||||
V.vector4_f32[1] = (FLOAT)(INT)(Element | SignExtend[Element >> 19]);
|
||||
Element = (UINT)(pSource->v >> 40) & 0xFFFFF;
|
||||
Element = (UINT)((pSource->v >> 40) & 0xFFFFF);
|
||||
V.vector4_f32[2] = (FLOAT)(INT)(Element | SignExtend[Element >> 19]);
|
||||
Element = (UINT)(pSource->v >> 60);
|
||||
V.vector4_f32[3] = (FLOAT)(INT)(Element | SignExtendW[Element >> 3]);
|
||||
|
@ -3134,6 +3134,24 @@ XMFINLINE _XMFLOAT4X3& _XMFLOAT4X3::operator=
|
||||
return *this;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
XMFINLINE XMFLOAT4X3A& XMFLOAT4X3A::operator=
|
||||
(
|
||||
CONST XMFLOAT4X3A& Float4x3
|
||||
)
|
||||
{
|
||||
XMVECTOR V1 = XMLoadFloat4A((XMFLOAT4A*)&Float4x3._11);
|
||||
XMVECTOR V2 = XMLoadFloat4A((XMFLOAT4A*)&Float4x3._22);
|
||||
XMVECTOR V3 = XMLoadFloat4A((XMFLOAT4A*)&Float4x3._33);
|
||||
|
||||
XMStoreFloat4A((XMFLOAT4A*)&_11, V1);
|
||||
XMStoreFloat4A((XMFLOAT4A*)&_22, V2);
|
||||
XMStoreFloat4A((XMFLOAT4A*)&_33, V3);
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
* XMFLOAT4X4 operators
|
||||
@ -3210,6 +3228,26 @@ XMFINLINE _XMFLOAT4X4& _XMFLOAT4X4::operator=
|
||||
return *this;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
XMFINLINE XMFLOAT4X4A& XMFLOAT4X4A::operator=
|
||||
(
|
||||
CONST XMFLOAT4X4A& Float4x4
|
||||
)
|
||||
{
|
||||
XMVECTOR V1 = XMLoadFloat4A((XMFLOAT4A*)&Float4x4._11);
|
||||
XMVECTOR V2 = XMLoadFloat4A((XMFLOAT4A*)&Float4x4._21);
|
||||
XMVECTOR V3 = XMLoadFloat4A((XMFLOAT4A*)&Float4x4._31);
|
||||
XMVECTOR V4 = XMLoadFloat4A((XMFLOAT4A*)&Float4x4._41);
|
||||
|
||||
XMStoreFloat4A((XMFLOAT4A*)&_11, V1);
|
||||
XMStoreFloat4A((XMFLOAT4A*)&_21, V2);
|
||||
XMStoreFloat4A((XMFLOAT4A*)&_31, V3);
|
||||
XMStoreFloat4A((XMFLOAT4A*)&_41, V4);
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
#endif // __cplusplus
|
||||
|
||||
#endif // __XNAMATHMATRIX_INL__
|
||||
|
@ -2132,11 +2132,26 @@ XMFINLINE XMVECTOR XMVectorTruncate
|
||||
{
|
||||
#if defined(_XM_NO_INTRINSICS_)
|
||||
XMVECTOR Result;
|
||||
Result.vector4_f32[0] = (FLOAT)((INT)V.vector4_f32[0]);
|
||||
Result.vector4_f32[1] = (FLOAT)((INT)V.vector4_f32[1]);
|
||||
Result.vector4_f32[2] = (FLOAT)((INT)V.vector4_f32[2]);
|
||||
Result.vector4_f32[3] = (FLOAT)((INT)V.vector4_f32[3]);
|
||||
UINT i;
|
||||
|
||||
// Avoid C4701
|
||||
Result.vector4_f32[0] = 0.0f;
|
||||
|
||||
for (i = 0; i < 4; i++)
|
||||
{
|
||||
if (XMISNAN(V.vector4_f32[i]))
|
||||
{
|
||||
Result.vector4_u32[i] = 0x7FC00000;
|
||||
}
|
||||
else if (fabsf(V.vector4_f32[i]) < 8388608.0f)
|
||||
{
|
||||
Result.vector4_f32[i] = (FLOAT)((INT)V.vector4_f32[i]);
|
||||
}
|
||||
else
|
||||
{
|
||||
Result.vector4_f32[i] = V.vector4_f32[i];
|
||||
}
|
||||
}
|
||||
return Result;
|
||||
|
||||
#elif defined(_XM_SSE_INTRINSICS_)
|
||||
@ -2623,6 +2638,27 @@ XMFINLINE XMVECTOR XMVectorMultiplyAdd
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
XMFINLINE XMVECTOR XMVectorDivide
|
||||
(
|
||||
FXMVECTOR V1,
|
||||
FXMVECTOR V2
|
||||
)
|
||||
{
|
||||
#if defined(_XM_NO_INTRINSICS_)
|
||||
XMVECTOR Result;
|
||||
Result.vector4_f32[0] = V1.vector4_f32[0] / V2.vector4_f32[0];
|
||||
Result.vector4_f32[1] = V1.vector4_f32[1] / V2.vector4_f32[1];
|
||||
Result.vector4_f32[2] = V1.vector4_f32[2] / V2.vector4_f32[2];
|
||||
Result.vector4_f32[3] = V1.vector4_f32[3] / V2.vector4_f32[3];
|
||||
return Result;
|
||||
#elif defined(_XM_SSE_INTRINSICS_)
|
||||
return _mm_div_ps( V1, V2 );
|
||||
#else // _XM_VMX128_INTRINSICS_
|
||||
#endif // _XM_VMX128_INTRINSICS_
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
XMFINLINE XMVECTOR XMVectorNegativeMultiplySubtract
|
||||
(
|
||||
FXMVECTOR V1,
|
||||
@ -2665,8 +2701,8 @@ XMFINLINE XMVECTOR XMVectorScale
|
||||
return vResult;
|
||||
|
||||
#elif defined(_XM_SSE_INTRINSICS_)
|
||||
XMVECTOR vResult = _mm_set_ps1(ScaleFactor);
|
||||
return _mm_mul_ps(vResult,V);
|
||||
XMVECTOR vResult = _mm_set_ps1(ScaleFactor);
|
||||
return _mm_mul_ps(vResult,V);
|
||||
#elif defined(XM_NO_MISALIGNED_VECTOR_ACCESS)
|
||||
#endif // _XM_VMX128_INTRINSICS_
|
||||
}
|
||||
@ -2679,7 +2715,6 @@ XMFINLINE XMVECTOR XMVectorReciprocalEst
|
||||
)
|
||||
{
|
||||
#if defined(_XM_NO_INTRINSICS_)
|
||||
|
||||
XMVECTOR Result;
|
||||
UINT i;
|
||||
|
||||
@ -2688,24 +2723,19 @@ XMFINLINE XMVECTOR XMVectorReciprocalEst
|
||||
|
||||
for (i = 0; i < 4; i++)
|
||||
{
|
||||
if (XMISINF(V.vector4_f32[i]))
|
||||
if (XMISNAN(V.vector4_f32[i]))
|
||||
{
|
||||
Result.vector4_f32[i] = (V.vector4_f32[i] < 0.0f) ? -0.0f : 0.0f;
|
||||
Result.vector4_u32[i] = 0x7FC00000;
|
||||
}
|
||||
else if (V.vector4_f32[i] == -0.0f)
|
||||
else if (V.vector4_f32[i] == 0.0f || V.vector4_f32[i] == -0.0f)
|
||||
{
|
||||
Result.vector4_u32[i] = 0xFF800000;
|
||||
}
|
||||
else if (V.vector4_f32[i] == 0.0f)
|
||||
{
|
||||
Result.vector4_u32[i] = 0x7F800000;
|
||||
Result.vector4_u32[i] = 0x7F800000 | (V.vector4_u32[i] & 0x80000000);
|
||||
}
|
||||
else
|
||||
{
|
||||
Result.vector4_f32[i] = 1.0f / V.vector4_f32[i];
|
||||
Result.vector4_f32[i] = 1.f / V.vector4_f32[i];
|
||||
}
|
||||
}
|
||||
|
||||
return Result;
|
||||
|
||||
#elif defined(_XM_SSE_INTRINSICS_)
|
||||
@ -2723,6 +2753,7 @@ XMFINLINE XMVECTOR XMVectorReciprocal
|
||||
{
|
||||
#if defined(_XM_NO_INTRINSICS_)
|
||||
return XMVectorReciprocalEst(V);
|
||||
|
||||
#elif defined(_XM_SSE_INTRINSICS_)
|
||||
return _mm_div_ps(g_XMOne,V);
|
||||
#else // _XM_VMX128_INTRINSICS_
|
||||
@ -2742,7 +2773,7 @@ XMFINLINE XMVECTOR XMVectorSqrtEst
|
||||
// if (x == +Infinity) sqrt(x) = +Infinity
|
||||
// if (x == +0.0f) sqrt(x) = +0.0f
|
||||
// if (x == -0.0f) sqrt(x) = -0.0f
|
||||
// if (x < -0.0f) sqrt(x) = QNaN
|
||||
// if (x < 0.0f) sqrt(x) = QNaN
|
||||
|
||||
XMVECTOR Result = XMVectorReciprocalSqrtEst(V);
|
||||
XMVECTOR Zero = XMVectorZero();
|
||||
@ -2776,7 +2807,7 @@ XMFINLINE XMVECTOR XMVectorSqrt
|
||||
// if (x == +Infinity) sqrt(x) = +Infinity
|
||||
// if (x == +0.0f) sqrt(x) = +0.0f
|
||||
// if (x == -0.0f) sqrt(x) = -0.0f
|
||||
// if (x < -0.0f) sqrt(x) = QNaN
|
||||
// if (x < 0.0f) sqrt(x) = QNaN
|
||||
|
||||
Result = XMVectorReciprocalSqrt(V);
|
||||
Zero = XMVectorZero();
|
||||
@ -2803,6 +2834,11 @@ XMFINLINE XMVECTOR XMVectorReciprocalSqrtEst
|
||||
{
|
||||
#if defined(_XM_NO_INTRINSICS_)
|
||||
|
||||
// if (x == +Infinity) rsqrt(x) = 0
|
||||
// if (x == +0.0f) rsqrt(x) = +Infinity
|
||||
// if (x == -0.0f) rsqrt(x) = -Infinity
|
||||
// if (x < 0.0f) rsqrt(x) = QNaN
|
||||
|
||||
XMVECTOR Result;
|
||||
UINT i;
|
||||
|
||||
@ -2811,13 +2847,13 @@ XMFINLINE XMVECTOR XMVectorReciprocalSqrtEst
|
||||
|
||||
for (i = 0; i < 4; i++)
|
||||
{
|
||||
if (V.vector4_f32[i] == 0.0f)
|
||||
if (XMISNAN(V.vector4_f32[i]))
|
||||
{
|
||||
Result.vector4_u32[i] = 0x7F800000;
|
||||
Result.vector4_u32[i] = 0x7FC00000;
|
||||
}
|
||||
else if (V.vector4_f32[i] == -0.0f)
|
||||
else if (V.vector4_f32[i] == 0.0f || V.vector4_f32[i] == -0.0f)
|
||||
{
|
||||
Result.vector4_u32[i] = 0xFF800000;
|
||||
Result.vector4_u32[i] = 0x7F800000 | (V.vector4_u32[i] & 0x80000000);
|
||||
}
|
||||
else if (V.vector4_f32[i] < 0.0f)
|
||||
{
|
||||
@ -6376,24 +6412,22 @@ XMFINLINE XMVECTOR XMVector2Normalize
|
||||
)
|
||||
{
|
||||
#if defined(_XM_NO_INTRINSICS_)
|
||||
FLOAT fLength;
|
||||
XMVECTOR vResult;
|
||||
|
||||
XMVECTOR LengthSq;
|
||||
XMVECTOR Zero;
|
||||
XMVECTOR InfiniteLength;
|
||||
XMVECTOR ZeroLength;
|
||||
XMVECTOR Select;
|
||||
XMVECTOR Result;
|
||||
vResult = XMVector2Length( V );
|
||||
fLength = vResult.vector4_f32[0];
|
||||
|
||||
LengthSq = XMVector2LengthSq(V);
|
||||
Zero = XMVectorZero();
|
||||
Result = XMVectorReciprocalSqrt(LengthSq);
|
||||
InfiniteLength = XMVectorEqualInt(LengthSq, g_XMInfinity.v);
|
||||
ZeroLength = XMVectorEqual(LengthSq, Zero);
|
||||
Result = XMVectorMultiply(V, Result);
|
||||
Select = XMVectorEqualInt(InfiniteLength, ZeroLength);
|
||||
Result = XMVectorSelect(LengthSq, Result, Select);
|
||||
|
||||
return Result;
|
||||
// Prevent divide by zero
|
||||
if (fLength > 0) {
|
||||
fLength = 1.0f/fLength;
|
||||
}
|
||||
|
||||
vResult.vector4_f32[0] = V.vector4_f32[0]*fLength;
|
||||
vResult.vector4_f32[1] = V.vector4_f32[1]*fLength;
|
||||
vResult.vector4_f32[2] = V.vector4_f32[2]*fLength;
|
||||
vResult.vector4_f32[3] = V.vector4_f32[3]*fLength;
|
||||
return vResult;
|
||||
|
||||
#elif defined(_XM_SSE_INTRINSICS_)
|
||||
// Perform the dot product on x and y only
|
||||
@ -6403,13 +6437,21 @@ XMFINLINE XMVECTOR XMVector2Normalize
|
||||
vLengthSq = _mm_shuffle_ps(vLengthSq,vLengthSq,_MM_SHUFFLE(0,0,0,0));
|
||||
// Prepare for the division
|
||||
XMVECTOR vResult = _mm_sqrt_ps(vLengthSq);
|
||||
// Create zero with a single instruction
|
||||
XMVECTOR vZeroMask = _mm_setzero_ps();
|
||||
// Test for a divide by zero (Must be FP to detect -0.0)
|
||||
vZeroMask = _mm_cmpneq_ps(vZeroMask,vResult);
|
||||
// Failsafe on zero (Or epsilon) length planes
|
||||
// If the length is infinity, set the elements to zero
|
||||
vLengthSq = _mm_cmpneq_ps(vLengthSq,g_XMInfinity);
|
||||
// Reciprocal mul to perform the normalization
|
||||
vResult = _mm_div_ps(V,vResult);
|
||||
// Any that are infinity, set to zero
|
||||
vResult = _mm_and_ps(vResult,vLengthSq);
|
||||
vResult = _mm_and_ps(vResult,vZeroMask);
|
||||
// Select qnan or result based on infinite length
|
||||
XMVECTOR vTemp1 = _mm_andnot_ps(vLengthSq,g_XMQNaN);
|
||||
XMVECTOR vTemp2 = _mm_and_ps(vResult,vLengthSq);
|
||||
vResult = _mm_or_ps(vTemp1,vTemp2);
|
||||
return vResult;
|
||||
#else // _XM_VMX128_INTRINSICS_
|
||||
#endif // _XM_VMX128_INTRINSICS_
|
||||
@ -8025,19 +8067,21 @@ XMFINLINE XMVECTOR XMVector3Normalize
|
||||
)
|
||||
{
|
||||
#if defined(_XM_NO_INTRINSICS_)
|
||||
FLOAT fLengthSq;
|
||||
FLOAT fLength;
|
||||
XMVECTOR vResult;
|
||||
|
||||
fLengthSq = sqrtf((V.vector4_f32[0]*V.vector4_f32[0])+(V.vector4_f32[1]*V.vector4_f32[1])+(V.vector4_f32[2]*V.vector4_f32[2]));
|
||||
vResult = XMVector3Length( V );
|
||||
fLength = vResult.vector4_f32[0];
|
||||
|
||||
// Prevent divide by zero
|
||||
if (fLengthSq) {
|
||||
fLengthSq = 1.0f/fLengthSq;
|
||||
if (fLength > 0) {
|
||||
fLength = 1.0f/fLength;
|
||||
}
|
||||
|
||||
vResult.vector4_f32[0] = V.vector4_f32[0]*fLengthSq;
|
||||
vResult.vector4_f32[1] = V.vector4_f32[1]*fLengthSq;
|
||||
vResult.vector4_f32[2] = V.vector4_f32[2]*fLengthSq;
|
||||
vResult.vector4_f32[3] = V.vector4_f32[3]*fLengthSq;
|
||||
vResult.vector4_f32[0] = V.vector4_f32[0]*fLength;
|
||||
vResult.vector4_f32[1] = V.vector4_f32[1]*fLength;
|
||||
vResult.vector4_f32[2] = V.vector4_f32[2]*fLength;
|
||||
vResult.vector4_f32[3] = V.vector4_f32[3]*fLength;
|
||||
return vResult;
|
||||
|
||||
#elif defined(_XM_SSE_INTRINSICS_)
|
||||
@ -8050,13 +8094,21 @@ XMFINLINE XMVECTOR XMVector3Normalize
|
||||
vLengthSq = _mm_shuffle_ps(vLengthSq,vLengthSq,_MM_SHUFFLE(0,0,0,0));
|
||||
// Prepare for the division
|
||||
XMVECTOR vResult = _mm_sqrt_ps(vLengthSq);
|
||||
// Create zero with a single instruction
|
||||
XMVECTOR vZeroMask = _mm_setzero_ps();
|
||||
// Test for a divide by zero (Must be FP to detect -0.0)
|
||||
vZeroMask = _mm_cmpneq_ps(vZeroMask,vResult);
|
||||
// Failsafe on zero (Or epsilon) length planes
|
||||
// If the length is infinity, set the elements to zero
|
||||
vLengthSq = _mm_cmpneq_ps(vLengthSq,g_XMInfinity);
|
||||
// Divide to perform the normalization
|
||||
vResult = _mm_div_ps(V,vResult);
|
||||
// Any that are infinity, set to zero
|
||||
vResult = _mm_and_ps(vResult,vLengthSq);
|
||||
vResult = _mm_and_ps(vResult,vZeroMask);
|
||||
// Select qnan or result based on infinite length
|
||||
XMVECTOR vTemp1 = _mm_andnot_ps(vLengthSq,g_XMQNaN);
|
||||
XMVECTOR vTemp2 = _mm_and_ps(vResult,vLengthSq);
|
||||
vResult = _mm_or_ps(vTemp1,vTemp2);
|
||||
return vResult;
|
||||
#else // _XM_VMX128_INTRINSICS_
|
||||
#endif // _XM_VMX128_INTRINSICS_
|
||||
@ -10211,15 +10263,10 @@ XMFINLINE XMVECTOR XMVector4NormalizeEst
|
||||
vLengthSq = _mm_add_ps(vLengthSq,vTemp);
|
||||
// Splat the length
|
||||
vLengthSq = _mm_shuffle_ps(vLengthSq,vLengthSq,_MM_SHUFFLE(2,2,2,2));
|
||||
// Prepare for the division
|
||||
// Get the reciprocal
|
||||
XMVECTOR vResult = _mm_rsqrt_ps(vLengthSq);
|
||||
// Failsafe on zero (Or epsilon) length planes
|
||||
// If the length is infinity, set the elements to zero
|
||||
vLengthSq = _mm_cmpneq_ps(vLengthSq,g_XMInfinity);
|
||||
// Reciprocal mul to perform the normalization
|
||||
vResult = _mm_mul_ps(vResult,V);
|
||||
// Any that are infinity, set to zero
|
||||
vResult = _mm_and_ps(vResult,vLengthSq);
|
||||
return vResult;
|
||||
#else // _XM_VMX128_INTRINSICS_
|
||||
#endif // _XM_VMX128_INTRINSICS_
|
||||
@ -10233,24 +10280,22 @@ XMFINLINE XMVECTOR XMVector4Normalize
|
||||
)
|
||||
{
|
||||
#if defined(_XM_NO_INTRINSICS_)
|
||||
FLOAT fLength;
|
||||
XMVECTOR vResult;
|
||||
|
||||
XMVECTOR LengthSq;
|
||||
XMVECTOR Zero;
|
||||
XMVECTOR InfiniteLength;
|
||||
XMVECTOR ZeroLength;
|
||||
XMVECTOR Select;
|
||||
XMVECTOR Result;
|
||||
vResult = XMVector4Length( V );
|
||||
fLength = vResult.vector4_f32[0];
|
||||
|
||||
LengthSq = XMVector4LengthSq(V);
|
||||
Zero = XMVectorZero();
|
||||
Result = XMVectorReciprocalSqrt(LengthSq);
|
||||
InfiniteLength = XMVectorEqualInt(LengthSq, g_XMInfinity.v);
|
||||
ZeroLength = XMVectorEqual(LengthSq, Zero);
|
||||
Result = XMVectorMultiply(V, Result);
|
||||
Select = XMVectorEqualInt(InfiniteLength, ZeroLength);
|
||||
Result = XMVectorSelect(LengthSq, Result, Select);
|
||||
|
||||
return Result;
|
||||
// Prevent divide by zero
|
||||
if (fLength > 0) {
|
||||
fLength = 1.0f/fLength;
|
||||
}
|
||||
|
||||
vResult.vector4_f32[0] = V.vector4_f32[0]*fLength;
|
||||
vResult.vector4_f32[1] = V.vector4_f32[1]*fLength;
|
||||
vResult.vector4_f32[2] = V.vector4_f32[2]*fLength;
|
||||
vResult.vector4_f32[3] = V.vector4_f32[3]*fLength;
|
||||
return vResult;
|
||||
|
||||
#elif defined(_XM_SSE_INTRINSICS_)
|
||||
// Perform the dot product on x,y,z and w
|
||||
@ -10269,13 +10314,21 @@ XMFINLINE XMVECTOR XMVector4Normalize
|
||||
vLengthSq = _mm_shuffle_ps(vLengthSq,vLengthSq,_MM_SHUFFLE(2,2,2,2));
|
||||
// Prepare for the division
|
||||
XMVECTOR vResult = _mm_sqrt_ps(vLengthSq);
|
||||
// Create zero with a single instruction
|
||||
XMVECTOR vZeroMask = _mm_setzero_ps();
|
||||
// Test for a divide by zero (Must be FP to detect -0.0)
|
||||
vZeroMask = _mm_cmpneq_ps(vZeroMask,vResult);
|
||||
// Failsafe on zero (Or epsilon) length planes
|
||||
// If the length is infinity, set the elements to zero
|
||||
vLengthSq = _mm_cmpneq_ps(vLengthSq,g_XMInfinity);
|
||||
// Divide to perform the normalization
|
||||
vResult = _mm_div_ps(V,vResult);
|
||||
// Any that are infinity, set to zero
|
||||
vResult = _mm_and_ps(vResult,vLengthSq);
|
||||
vResult = _mm_and_ps(vResult,vZeroMask);
|
||||
// Select qnan or result based on infinite length
|
||||
XMVECTOR vTemp1 = _mm_andnot_ps(vLengthSq,g_XMQNaN);
|
||||
XMVECTOR vTemp2 = _mm_and_ps(vResult,vLengthSq);
|
||||
vResult = _mm_or_ps(vTemp1,vTemp2);
|
||||
return vResult;
|
||||
#else // _XM_VMX128_INTRINSICS_
|
||||
#endif // _XM_VMX128_INTRINSICS_
|
||||
@ -10887,8 +10940,7 @@ XMFINLINE XMVECTOR& operator/=
|
||||
FXMVECTOR V2
|
||||
)
|
||||
{
|
||||
XMVECTOR InvV = XMVectorReciprocal(V2);
|
||||
V1 = XMVectorMultiply(V1, InvV);
|
||||
V1 = XMVectorDivide(V1,V2);
|
||||
return V1;
|
||||
}
|
||||
|
||||
@ -10957,8 +11009,7 @@ XMFINLINE XMVECTOR operator/
|
||||
FXMVECTOR V2
|
||||
)
|
||||
{
|
||||
XMVECTOR InvV = XMVectorReciprocal(V2);
|
||||
return XMVectorMultiply(V1, InvV);
|
||||
return XMVectorDivide(V1,V2);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
@ -11025,6 +11076,18 @@ XMFINLINE _XMFLOAT2& _XMFLOAT2::operator=
|
||||
return *this;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
XMFINLINE XMFLOAT2A& XMFLOAT2A::operator=
|
||||
(
|
||||
CONST XMFLOAT2A& Float2
|
||||
)
|
||||
{
|
||||
x = Float2.x;
|
||||
y = Float2.y;
|
||||
return *this;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
* XMHALF2 operators
|
||||
@ -11308,6 +11371,19 @@ XMFINLINE _XMFLOAT3& _XMFLOAT3::operator=
|
||||
return *this;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
XMFINLINE XMFLOAT3A& XMFLOAT3A::operator=
|
||||
(
|
||||
CONST XMFLOAT3A& Float3
|
||||
)
|
||||
{
|
||||
x = Float3.x;
|
||||
y = Float3.y;
|
||||
z = Float3.z;
|
||||
return *this;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
* XMHENDN3 operators
|
||||
@ -11877,6 +11953,20 @@ XMFINLINE _XMFLOAT4& _XMFLOAT4::operator=
|
||||
return *this;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
XMFINLINE XMFLOAT4A& XMFLOAT4A::operator=
|
||||
(
|
||||
CONST XMFLOAT4A& Float4
|
||||
)
|
||||
{
|
||||
x = Float4.x;
|
||||
y = Float4.y;
|
||||
z = Float4.z;
|
||||
w = Float4.w;
|
||||
return *this;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
* XMHALF4 operators
|
||||
|
Loading…
Reference in New Issue
Block a user