### XMVectorPermute usage examples Source: https://learn.microsoft.com/en-us/windows/win32/dxmath/xmvectorpermute-template Demonstrates preferred and alternative usage patterns for the XMVectorPermute template. ```cpp XMVectorPermute<0,1,4,5>(A,B); ``` ```cpp XMVectorPermute(4,5,0,1)(B,A); ``` -------------------------------- ### Initialize XMVECTOR using XMVECTORU32 Source: https://learn.microsoft.com/en-us/windows/win32/dxmath/xmvectoru32-data-type Example demonstrating how to use XMVECTORU32 to initialize an XMVECTOR instance with constant unsigned integer values. ```C++ XMVECTOR data; XMVECTORU32 uintVector = { 0xf7000000, 0x8310000, 0x1000000, 0 }; data = uintVector; ``` -------------------------------- ### Initialize XMVECTOR with XMVECTORF32 Source: https://learn.microsoft.com/en-us/windows/win32/dxmath/xmvectorf32-data-type Example demonstrating the use of XMVECTORF32 to initialize an XMVECTOR object using C++ initializer syntax. ```cpp XMVECTOR data; XMVECTORF32 floatingVector = { 0.f, 0.f, 0.1f, 1.f }; data = floatingVector; ``` -------------------------------- ### DirectXMath Function Declarations Source: https://learn.microsoft.com/en-us/windows/win32/dxmath/pg-xnamath-internals Example function declarations demonstrating the use of calling convention aliases and the XM_CALLCONV annotation. ```cpp XMMATRIX XM_CALLCONV XMMatrixLookAtLH(FXMVECTOR EyePosition, FXMVECTOR FocusPosition, FXMVECTOR UpDirection); XMMATRIX XM_CALLCONV XMMatrixTransformation2D(FXMVECTOR ScalingOrigin, float ScalingOrientation, FXMVECTOR Scaling, FXMVECTOR RotationOrigin, float Rotation, GXMVECTOR Translation); void XM_CALLCONV XMVectorSinCos(XMVECTOR* pSin, XMVECTOR* pCos, FXMVECTOR V); XMVECTOR XM_CALLCONV XMVectorHermiteV(FXMVECTOR Position0, FXMVECTOR Tangent0, FXMVECTOR Position1, GXMVECTOR Tangent1, HXMVECTOR T); XMMATRIX(FXMVECTOR R0, FXMVECTOR R1, FXMVECTOR R2, CXMVECTOR R3) XMVECTOR XM_CALLCONV XMVector2Transform(FXMVECTOR V, FXMMATRIX M); XMMATRIX XM_CALLCONV XMMatrixMultiplyTranspose(FXMMATRIX M1, CXMMATRIX M2); ``` -------------------------------- ### Initialize XMVECTOR using XMVECTORI32 Source: https://learn.microsoft.com/en-us/windows/win32/dxmath/xmvectori32-data-type Demonstrates how to use XMVECTORI32 to initialize an XMVECTOR instance with integer values. ```C++ XMVECTOR data; XMVECTORI32 intVector = { -1, 5, 33, 0 }; data = intVector; ``` -------------------------------- ### Initialize XMVECTOR with XMVECTORU8 Source: https://learn.microsoft.com/en-us/windows/win32/dxmath/xmvectoru8-data-type Demonstrates initializing an XMVECTOR with uint8_t values using the XMVECTORU8 structure. This syntax is used for constant data types when XMVECTOR does not directly support initializers. ```cpp XMVECTOR data; XMVECTORU8 byteVector = { (uint8_t) 1,(uint8_t) 16,(uint8_t)101,(uint8_t) 62, (uint8_t) 4,(uint8_t) 0,(uint8_t) 2,(uint8_t) 99, (uint8_t) 9,(uint8_t) 18,(uint8_t) 0,(uint8_t) 0, (uint8_t)100,(uint8_t) 51,(uint8_t) 23,(uint8_t)117}; data = floatingVector; ``` -------------------------------- ### BoundingBox Constructors Source: https://learn.microsoft.com/en-us/windows/win32/dxmath/boundingbox-ctor Provides information on how to create instances of the BoundingBox class. ```APIDOC ## BoundingBox Constructors ### Description Creates an instance of the `BoundingBox` class. ### Overload list #### BoundingBox () ##### Description Creates an instance of the `BoundingBox` class. ##### Method Constructor ##### Endpoint N/A #### BoundingBox (const BoundingBox &) ##### Description Creates an instance of the `BoundingBox` class. ##### Method Constructor ##### Endpoint N/A #### BoundingBox (const XMFLOAT3 &,const XMFLOAT3&) ##### Description Creates an instance of the `BoundingBox` class. ##### Method Constructor ##### Endpoint N/A ``` -------------------------------- ### XMFLOAT3PK Constructors Source: https://learn.microsoft.com/en-us/windows/win32/dxmath/xmfloat3pk-ctor Overview of the available constructors for the XMFLOAT3PK structure. ```APIDOC ## XMFLOAT3PK Constructors ### Description Constructs instances of the XMFLOAT3PK structure. These constructors are available under C++. ### Constructors - **XMFLOAT3PK()** - Default constructor. - **XMFLOAT3PK(uint32_t packed)** - Initializes from a uint32_t variable containing component data in a packed format. - **XMFLOAT3PK(const float* pArray)** - Initializes from a three-element float array. - **XMFLOAT3PK(float x, float y, float z)** - Initializes from three individual float arguments. ``` -------------------------------- ### DirectX.BoundingSphere Constructors Source: https://learn.microsoft.com/en-us/windows/win32/dxmath/boundingsphere-ctor Details the various ways to instantiate a BoundingSphere object. ```APIDOC ## DirectX.BoundingSphere Constructors ### Description Creates an instance of the BoundingSphere class using one of the available overloads. ### Constructors - **DirectX.BoundingSphere ()** - Creates a default instance of the BoundingSphere class. - **DirectX.BoundingSphere (const XMFLOAT3 &, float)** - Creates an instance of the BoundingSphere class using a center point and radius. - **DirectX.BoundingSphere (const BoundingSphere &)** - Creates an instance of the BoundingSphere class as a copy of an existing BoundingSphere. ``` -------------------------------- ### XMINT3 Constructors Source: https://learn.microsoft.com/en-us/windows/win32/dxmath/xmint3-ctor Constructors for initializing instances of the XMINT3 structure. ```APIDOC ## XMINT3 Constructors ### Description Constructs instances of the XMINT3 structure. These constructors are available only under C++. ### Overloads - **XMINT3(const int32_t*)** - Initializes a new instance of XMINT3 from a three-element int32_t array argument. - **XMINT3(int32_t, int32_t, int32_t)** - Initializes a new instance of XMINT3 from three individual int32_t arguments. - **XMINT3()** - Default constructor for XMINT3. ### Requirements - **Header**: Directxmath.h ``` -------------------------------- ### BoundingBox Methods Overview Source: https://learn.microsoft.com/en-us/windows/win32/dxmath/boundingbox-methods A summary of the available methods for the BoundingBox structure used in DirectXMath. ```APIDOC ## BoundingBox Methods ### Description Methods for manipulating and querying BoundingBox objects. ### Methods - **Contains**: Tests whether the BoundingBox contains a specified object. - **CreateFromPoints**: Creates a BoundingBox from points. - **Intersects**: Tests the BoundingBox for intersection with another object. - **Transform**: Transforms the BoundingBox. - **ContainedBy**: Tests whether the BoundingBox is contained by the specified frustum. - **CreateFromSphere**: Creates a BoundingBox large enough to contain a specified BoundingSphere. - **CreateMerged**: Creates a BoundingBox large enough to contain two specified BoundingBox instances. - **GetCorners**: Retrieves the corners of the BoundingBox. - **op_Assignment**: Copies values from another BoundingBox. ``` -------------------------------- ### XMINT2 Constructors Source: https://learn.microsoft.com/en-us/windows/win32/dxmath/xmint2-ctor Overloaded constructors for initializing XMINT2 instances. ```APIDOC ## XMINT2 Constructors ### Description Constructs instances of the XMINT2 structure. These constructors are available only under C++. ### Overloads - **XMINT2(const int32_t*)**: Initializes a new instance of XMINT2 from a two-element int32_t array argument. - **XMINT2(int32_t, int32_t)**: Initializes a new instance of XMINT2 from two int32_t arguments. - **XMINT2()**: Default constructor for XMINT2. ### Requirements - **Header**: Directxmath.h ``` -------------------------------- ### XMSHORTN4 Constructors Source: https://learn.microsoft.com/en-us/windows/win32/dxmath/xmshortn4-ctor A list of available constructors for the XMSHORTN4 structure in C++. ```APIDOC ## XMSHORTN4 Constructors ### Description Constructs instances of the XMSHORTN4 structure. These constructors are only available under C++. ### Constructors - **XMSHORTN4()** - Default constructor for XMSHORTN4. - **XMSHORTN4(const float*)** - Initializes a new instance of XMSHORTN4 from a four element float array argument. - **XMSHORTN4(const int16_t*)** - Initializes a new instance of XMSHORTN4 from a four element int16_t array argument. - **XMSHORTN4(float, float, float, float)** - Initializes a new instance of XMSHORTN4 from four normalized float arguments. - **XMSHORTN4(int16_t, int16_t, int16_t, int16_t)** - Initializes a new instance of XMSHORTN4 from four int16_t arguments. ``` -------------------------------- ### BoundingFrustum Methods Overview Source: https://learn.microsoft.com/en-us/windows/win32/dxmath/boundingfrustum-methods A summary of the methods available for the BoundingFrustum class. ```APIDOC ## BoundingFrustum Methods ### Description Methods for manipulating and testing BoundingFrustum objects in DirectXMath. ### Methods - **Contains**: Tests whether the BoundingFrustum contains a specified object. - **Intersects**: Tests the BoundingFrustum for intersection with another object. - **Transform**: Transforms the BoundingFrustum. - **ContainedBy**: Tests whether the BoundingFrustum is contained by the specified frustum. - **CreateFromMatrix**: Creates a BoundingFrustum from the specified projection matrix. - **GetCorners**: Gets the corners making up the BoundingFrustum. - **GetPlanes**: Gets the planes making up the BoundingFrustum. - **op_Assignment**: Copies values from another BoundingFrustum. ``` -------------------------------- ### XMUINT2 Constructors Source: https://learn.microsoft.com/en-us/windows/win32/dxmath/xmuint2-ctor Overview of the available constructors for initializing an XMUINT2 structure. ```APIDOC ## XMUINT2 Constructors ### Description Constructs instances of the XMUINT2 structure. These constructors are available under C++. ### Constructors - **XMUINT2()** - Default constructor for XMUINT2. - **XMUINT2(const uint32_t*)** - Initializes a new instance of XMUINT2 from a two-element uint32_t array argument. - **XMUINT2(uint32_t, uint32_t)** - Initializes a new instance of XMUINT2 from two uint32_t arguments. ### Requirements - **Header**: DirectXMath.h ``` -------------------------------- ### XMSHORTN2 Constructors Source: https://learn.microsoft.com/en-us/windows/win32/dxmath/xmshortn2-ctor Constructors for the XMSHORTN2 structure. ```APIDOC ## XMSHORTN2 Constructors ### Description Constructors exposed by `XMSHORTN2`. Constructs instances of the **XMSHORTN2** structure. **Note:** The constructors listed here are only available under C++. ### Overload list **XMSHORTN2 (void)** ### Description Default constructor for `XMSHORTN2`. ### Method Constructor ### Endpoint N/A ### Parameters None ### Request Example ```cpp XMSHORTN2 myVector; ``` ### Response #### Success Response (200) Initializes a default `XMSHORTN2` object. #### Response Example ```cpp // myVector is now a default XMSHORTN2 object ``` **XMSHORTN2 (float, float)** ### Description Initializes a new instance of `XMSHORTN2` from two normalized `float` arguments. ### Method Constructor ### Endpoint N/A ### Parameters - **x** (float) - Required - The normalized x-component. - **y** (float) - Required - The normalized y-component. ### Request Example ```cpp XMSHORTN2 myVector(0.5f, -0.25f); ``` ### Response #### Success Response (200) Initializes a new `XMSHORTN2` object with the specified normalized float values. #### Response Example ```cpp // myVector is now XMSHORTN2(0.5f, -0.25f) ``` **XMSHORTN2 (const float *)** ### Description Initializes a new instance of `XMSHORTN2` from a two-element `float` array argument. ### Method Constructor ### Endpoint N/A ### Parameters - **pArray** (const float *) - Required - A pointer to a two-element float array. ### Request Example ```cpp float data[2] = {0.75f, -0.1f}; XMSHORTN2 myVector(data); ``` ### Response #### Success Response (200) Initializes a new `XMSHORTN2` object from the provided float array. #### Response Example ```cpp // myVector is now XMSHORTN2(0.75f, -0.1f) ``` **XMSHORTN2 (const int16_t *)** ### Description Initializes a new instance of `XMSHORTN2` from a two-element `int16_t` array argument. ### Method Constructor ### Endpoint N/A ### Parameters - **pArray** (const int16_t *) - Required - A pointer to a two-element int16_t array. ### Request Example ```cpp int16_t data[2] = {1000, -500}; XMSHORTN2 myVector(data); ``` ### Response #### Success Response (200) Initializes a new `XMSHORTN2` object from the provided int16_t array. #### Response Example ```cpp // myVector is now XMSHORTN2(1000, -500) ``` **XMSHORTN2 (int16_t, int16_t)** ### Description Initializes a new instance of `XMSHORTN2` from two `int16_t` arguments. ### Method Constructor ### Endpoint N/A ### Parameters - **x** (int16_t) - Required - The x-component. - **y** (int16_t) - Required - The y-component. ### Request Example ```cpp XMSHORTN2 myVector(500, -200); ``` ### Response #### Success Response (200) Initializes a new `XMSHORTN2` object with the specified int16_t values. #### Response Example ```cpp // myVector is now XMSHORTN2(500, -200) ``` ``` -------------------------------- ### XMFLOAT3 Constructors Source: https://learn.microsoft.com/en-us/windows/win32/dxmath/xmfloat3-ctor Constructors for initializing XMFLOAT3 structures. ```APIDOC ## XMFLOAT3 Constructors ### Description Constructors exposed by `XMFLOAT3` to create instances of the structure. ### Method Constructor Overloads ### Endpoint N/A (C++ specific constructors) ### Parameters #### XMFLOAT3 () - **None** - Initializes a new instance of `XMFLOAT3` with default values. #### XMFLOAT3 (const float_) - **float_** (const float array) - Required - Initializes a new instance of `XMFLOAT3` from a three-element float array. #### XMFLOAT3 (float, float, float) - **float** (float) - Required - The first float value. - **float** (float) - Required - The second float value. - **float** (float) - Required - The third float value. ### Request Example ```cpp // Default constructor XMFLOAT3 vec1; // Constructor from float array float arr[3] = {1.0f, 2.0f, 3.0f}; XMFLOAT3 vec2(arr); // Constructor from float arguments XMFLOAT3 vec3(4.0f, 5.0f, 6.0f); ``` ### Response #### Success Response (Initialization) - **XMFLOAT3** - An initialized XMFLOAT3 structure. #### Response Example ```cpp // vec1 will be {0.0f, 0.0f, 0.0f} // vec2 will be {1.0f, 2.0f, 3.0f} // vec3 will be {4.0f, 5.0f, 6.0f} ``` ### Requirements - **Header**: DirectXMath.h - **Note**: These constructors are only available under C++. ``` -------------------------------- ### BoundingBox::CreateFromPoints (BoundingBox &,XMVECTOR,XMVECTOR) Source: https://learn.microsoft.com/en-us/windows/win32/dxmath/boundingbox-createfrompoints Creates a BoundingBox from two points. ```APIDOC ## BoundingBox::CreateFromPoints (BoundingBox &,XMVECTOR,XMVECTOR) ### Description Creates a BoundingBox from two points. ### Method Static method of BoundingBox ### Parameters * **BoundingBox &** - The BoundingBox to create. * **XMVECTOR** - The first point. * **XMVECTOR** - The second point. ### Response * **BoundingBox** - The created BoundingBox. ``` -------------------------------- ### BoundingBox::CreateFromPoints (BoundingBox &,size_t,const XMFLOAT3*,size_t) Source: https://learn.microsoft.com/en-us/windows/win32/dxmath/boundingbox-createfrompoints Creates a BoundingBox from a list of points. ```APIDOC ## BoundingBox::CreateFromPoints (BoundingBox &,size_t,const XMFLOAT3*,size_t) ### Description Creates a BoundingBox from a list of points. ### Method Static method of BoundingBox ### Parameters * **BoundingBox &** - The BoundingBox to create. * **size_t** - The number of points in the array. * **const XMFLOAT3*** - The array of points. * **size_t** - The stride of the array (in bytes). ### Response * **BoundingBox** - The created BoundingBox. ``` -------------------------------- ### XMHALF4 Constructors Source: https://learn.microsoft.com/en-us/windows/win32/dxmath/xmhalf4-ctor Constructors for initializing XMHALF4 structures. ```APIDOC ## XMHALF4 Constructors ### Description Constructors exposed by `XMHALF4`. Constructs instances of the **XMHALF4** structure. Note: The constructors listed here are only available under C++. ### Overload list #### Default Constructor ```cpp XMHALF4 () ``` **Description:** Default constructor for `XMHALF4`. #### Constructor from HALF array ```cpp XMHALF4 (const HALF_) ``` **Description:** Initializes a new instance of `XMHALF4` from a four-element `HALF` array argument. #### Constructor from float array ```cpp XMHALF4 (const float_) ``` **Description:** Initializes a new instance of `XMHALF4` from a four-element `float` array argument. #### Constructor from four HALF arguments ```cpp XMHALF4 (HALF,HALF,HALF,HALF) ``` **Description:** Initializes a new instance of `XMHALF4` from four `HALF` arguments. #### Constructor from four float arguments ```cpp XMHALF4 (float,float,float,float) ``` **Description:** Initializes a new instance of `XMHALF4` from four `float` arguments. ### See also - XMHALF4 Extensions - Reference - XMHALF4 ``` -------------------------------- ### XMHALF2 Constructors and Operators Source: https://learn.microsoft.com/en-us/windows/win32/dxmath/ovw-xmhalf2-extensions Details on the constructors and operators provided by the XMHALF2 structure for C++ development. ```APIDOC ## XMHALF2 Constructors and Operators ### Description This section outlines the constructors and operators exposed by the `XMHALF2` structure. ### Topic - XMHALF2 Constructors - XMHALF2 Operators ### Usage Notes - The features listed are available when developing with C++. ### Related Topics - Reference - XMHALF2 ``` -------------------------------- ### XMFLOAT3SE Constructors Source: https://learn.microsoft.com/en-us/windows/win32/dxmath/xmfloat3se-ctor Constructors for the XMFLOAT3SE structure. ```APIDOC ## XMFLOAT3SE Constructors Constructors exposed by `XMFLOAT3SE`. Constructs instances of the **XMFLOAT3SE** structure. **Note:** The constructors listed here are only available under C++. ### Overload list | Constructor | Description | |---|---| | **XMFLOAT3SE ()** | Default constructor for `XMFLOAT3SE`. | Default constructor for **XMFLOAT3SE**. **Note:** This constructor is only available under C++. | **XMFLOAT3SE (uint32_t)** | Initializes a new instance of `XMFLOAT3SE` from a `uint32_t` variable containing component data in a packed format. | This constructor initializes a new instance of **XMFLOAT3SE** from a `uint32_t` variable containing component data in a packed format. **Note:** This constructor is only available under C++. | *_XMFLOAT3SE (const float_)* | Initializes a new instance of `XMFLOAT3SE` from a three element `float` array argument. | This constructor initializes a new instance of **XMFLOAT3SE** from a from a three element `float` array argument. **Note:** This constructor is only available under C++. | **XMFLOAT3SE (float,float,float)** | Initializes a new instance of `XMFLOAT3SE` from three `float` arguments. | This constructor initializes a new instance of **XMFLOAT3SE** from three `float` arguments. **Note:** This constructor is only available under C++. ### See also * XMFLOAT3SE Extensions * Reference * XMFLOAT3SE ``` -------------------------------- ### Vector Initialization Functions Source: https://learn.microsoft.com/en-us/windows/win32/dxmath/ovw-xnamath-reference-functions-vector-initialization A collection of functions for initializing vectors with specific values or constants. ```APIDOC ## Vector Initialization Functions ### Description Functions to initialize vectors with specific floating-point or integer values, or predefined constants. ### Functions - **XMVectorFalseInt**: Returns the zero (false) vector. - **XMVectorReplicate**: Replicates a floating-point value into all four components of a vector. - **XMVectorReplicateInt**: Replicates an integer value into all four components of a vector. - **XMVectorReplicateIntPtr**: Replicates an integer value referenced by a pointer into all four components of a vector. - **XMVectorReplicatePtr**: Replicates a floating-point value referenced by pointer into all four components of a vector. - **XMVectorSet**: Creates a vector using four floating-point values. - **XMVectorSetBinaryConstant**: Creates a vector, each of whose components is either 0.0f or 1.0f. - **XMVectorSetInt**: Creates a vector with unsigned integer components. - **XMVectorSplatConstant**: Creates a vector with identical floating-point components based on a constant divided by two raised to an integer exponent. - **XMVectorSplatConstantInt**: Creates a vector with identical integer components. - **XMVectorSplatEpsilon**: Returns a vector, each of whose components are epsilon (1.192092896e-7). - **XMVectorSplatInfinity**: Returns a vector, each of whose components are infinity (0x7F800000). - **XMVectorSplatOne**: Returns a vector, each of whose components are one. - **XMVectorSplatQNaN**: Returns a vector, each of whose components are QNaN (0x7CF00000). - **XMVectorSplatSignMask**: Returns a vector, each of whose components are the sign mask (0x80000000). - **XMVectorTrueInt**: Returns a vector, each of whose components represents true (0xFFFFFFFF). - **XMVectorZero**: Creates the zero vector. ``` -------------------------------- ### BoundingFrustum Constructors Source: https://learn.microsoft.com/en-us/windows/win32/dxmath/boundingfrustum-ctor Overview of the available constructors for the BoundingFrustum class. ```APIDOC ## BoundingFrustum Constructors ### Description Creates an instance of the BoundingFrustum class using one of the available constructor overloads. ### Overloads - **BoundingFrustum()**: Creates a default instance of BoundingFrustum. - **BoundingFrustum(CXMMATRIX, bool)**: Creates an instance of BoundingFrustum from a matrix and a boolean flag. - **BoundingFrustum(const BoundingFrustum &)**: Copy constructor for BoundingFrustum. - **BoundingFrustum(const XMFLOAT3 &, const XMFLOAT4 &, float, float, float, float, float, float)**: Creates an instance of BoundingFrustum using specific geometric parameters. ``` -------------------------------- ### XMUSHORTN2 Constructors Source: https://learn.microsoft.com/en-us/windows/win32/dxmath/xmushortn2-ctor List of available constructors for the XMUSHORTN2 structure. ```APIDOC ## XMUSHORTN2 Constructors ### Description Constructs instances of the XMUSHORTN2 structure. These constructors are available under C++. ### Constructors - **XMUSHORTN2()** - Default constructor. - **XMUSHORTN2(float, float)** - Initializes from two normalized float arguments. - **XMUSHORTN2(const uint16_t*)** - Initializes from a two-element uint16_t array argument. - **XMUSHORTN2(uint16_t, uint16_t)** - Initializes from two uint16_t arguments. ``` -------------------------------- ### XMCOLOR Constructors Source: https://learn.microsoft.com/en-us/windows/win32/dxmath/xmcolor-ctor Overloaded constructors for initializing XMCOLOR instances in C++. ```APIDOC ## XMCOLOR Constructors ### Description Constructs instances of the XMCOLOR structure. These constructors are available for C++ based development. ### Constructors - **XMCOLOR()** - Default constructor. - **XMCOLOR(uint32_t)** - Initializes from a uint32_t variable containing component data in a packed format. - **XMCOLOR(const float*)** - Initializes from a four element float array. - **XMCOLOR(float, float, float, float)** - Initializes from four individual float arguments. ``` -------------------------------- ### XMU565 Constructor Overloads Source: https://learn.microsoft.com/en-us/windows/win32/dxmath/xmu565-ctor A list of available constructors for the XMU565 structure in C++. ```APIDOC ## XMU565 Constructors ### Description Constructs instances of the XMU565 structure. These constructors are available exclusively for C++ development. ### Constructors - **XMU565(uint16_t)**: Initializes a new instance from a uint16_t variable containing component data in a packed format. - **XMU565(const float*)**: Initializes a new instance from a three-element float array. - **XMU565(const uint8_t*)**: Initializes a new instance from a three-element uint8_t array. - **XMU565(float, float, float)**: Initializes a new instance from three float arguments. - **XMU565(uint8_t, uint8_t, uint8_t)**: Initializes a new instance from three uint8_t arguments. - **XMU565()**: Default constructor for XMU565. ``` -------------------------------- ### XMUBYTEN4 Constructors Source: https://learn.microsoft.com/en-us/windows/win32/dxmath/xmubyten4-ctor A list of available constructors for the XMUBYTEN4 structure, used to initialize instances with different data formats. ```APIDOC ## XMUBYTEN4 Constructors ### Description Constructs instances of the XMUBYTEN4 structure. These constructors are available exclusively under C++. ### Constructors - **XMUBYTEN4()** - Default constructor. - **XMUBYTEN4(uint32_t packed)** - Initializes from a uint32_t variable containing component data in a packed format. - **XMUBYTEN4(const float* pArray)** - Initializes from a four-element float array. - **XMUBYTEN4(const uint8_t* pArray)** - Initializes from a four-element uint8_t array. - **XMUBYTEN4(float x, float y, float z, float w)** - Initializes from four individual float arguments. - **XMUBYTEN4(uint8_t x, uint8_t y, uint8_t z, uint8_t w)** - Initializes from four individual uint8_t arguments. ``` -------------------------------- ### DirectXMath Library Overview Source: https://learn.microsoft.com/en-us/windows/win32/dxmath/ovw-xnamath-reference This section provides an overview of the different components of the DirectXMath Library. ```APIDOC ## DirectXMath Programming Reference This section contains reference material for the DirectXMath Library. ### In this section | Topic | Description | |---------------------------------------|------------------------------------------------------------------------------------------------------------| | DirectXMath Library compiler directives | Compiler directives tune the functionality that the DirectXMath library uses. | | DirectXMath Library constants | The following constants are provided by the DirectXMath Library. | | DirectXMath Library functions | Contains information about the DirectXMath functions. | | DirectXMath Library macros | Lists macros provided by DirectXMath. | | DirectXMath Library structures | Describes the DirectXMath Library types and structures. | | DirectXMath Library classes | This section contains information about classes provided by the Microsoft DirectXMath API. | | DirectXMath enumerations | This section contains information about the DirectXMath enumerations. | | DirectXMath Library types | The DirectXMath Library provides a number of structures and defined types to encapsulate data to support ease of use, optimization, and portability. | ### Related topics * DirectXMath * DirectXMath programming guide ``` -------------------------------- ### XMSHORT2 Constructors Source: https://learn.microsoft.com/en-us/windows/win32/dxmath/xmshort2-ctor List of available constructors for the XMSHORT2 structure in C++. ```APIDOC ## XMSHORT2 Constructors ### Description Constructs instances of the XMSHORT2 structure. These constructors are available exclusively under C++. ### Constructors - **XMSHORT2()**: Default constructor. - **XMSHORT2(float, float)**: Initializes from two float arguments. - **XMSHORT2(const float*)**: Initializes from a two-element float array. - **XMSHORT2(const int16_t*)**: Initializes from a two-element int16_t array. - **XMSHORT2(int16_t, int16_t)**: Initializes from two int16_t arguments. ``` -------------------------------- ### XMHALF2 Constructors Source: https://learn.microsoft.com/en-us/windows/win32/dxmath/xmhalf2-ctor List of available constructors for the XMHALF2 structure in C++. ```APIDOC ## XMHALF2 Constructors ### Description Constructs instances of the XMHALF2 structure. These constructors are only available under C++. ### Constructors - **XMHALF2()** - Default constructor for XMHALF2. - **XMHALF2(HALF, HALF)** - Initializes a new instance of XMHALF2 from two HALF arguments. - **XMHALF2(const HALF*)** - Initializes a new instance of XMHALF2 from a two element HALF array argument. - **XMHALF2(float, float)** - Initializes a new instance of XMHALF2 from two float arguments. - **XMHALF2(const float*)** - Initializes a new instance of XMHALF2 from a two element float array argument. ``` -------------------------------- ### XMMATRIX Constructors Source: https://learn.microsoft.com/en-us/windows/win32/dxmath/ovw-xmmatrix-extensions Constructs instances of the XMMATRIX structure. ```APIDOC ## XMMATRIX Constructors ### Description Constructs instances of the XMMATRIX structure. ### Method N/A (Constructors are language-specific) ### Endpoint N/A ### Parameters N/A ### Request Example N/A ### Response N/A ``` -------------------------------- ### XMFLOAT2 Constructors Source: https://learn.microsoft.com/en-us/windows/win32/dxmath/xmfloat2-ctor Constructors for the XMFLOAT2 structure. ```APIDOC ## XMFLOAT2 Constructors Constructors exposed by `XMFLOAT2`. Constructs instances of the **XMFLOAT2** structure. **Note:** The constructors listed here are only available under C++. ### Overload list **XMFLOAT2 () Default constructor for `XMFLOAT2`. **Note:** This constructor is only available under C++. **XMFLOAT2 (float,float) Initializes a new instance of `XMFLOAT2` from two `float` arguments. **Note:** This constructor is only available under C++. **XMFLOAT2 (const float_) Initializes a new instance of `XMFLOAT2` from a two element `float` array argument. **Note:** This constructor is only available under C++. ### Requirements | Requirement | Value | |---|---| | Header | DirectXMath.h | ### See also * XMFLOAT2 Extensions * **Reference** * **XMFLOAT2** ``` -------------------------------- ### XMFLOAT4X4 Constructors Source: https://learn.microsoft.com/en-us/windows/win32/dxmath/xmfloat4x4-ctor Constructors for the XMFLOAT4X4 structure. ```APIDOC ## XMFLOAT4X4 Constructors ### Description Constructs instances of the XMFLOAT4X4 structure. ### Method Constructor ### Endpoint N/A (C++ specific) ### Parameters #### Overload 1: XMFLOAT4X4 (float,float,float,float,float,float,float,float,float,float,float,float,float,float,float,float) Initializes a new instance of the XMFLOAT4X4 structure from sixteen scalar float values. #### Overload 2: XMFLOAT4X4 () Default constructor for XMFLOAT4X4. #### Overload 3: XMFLOAT4X4 (const float_) Initializes a new instance of the XMFLOAT4X4 structure from a sixteen element float array. ### Request Example ```cpp // Example for Overload 1 XMFLOAT4X4 matrix1(1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f); // Example for Overload 2 XMFLOAT4X4 matrix2; // Example for Overload 3 float data[16] = { ... }; XMFLOAT4X4 matrix3(data); ``` ### Response #### Success Response (200) N/A (Constructors do not return values in the typical API sense) #### Response Example N/A ``` -------------------------------- ### XMFLOAT3X3 Constructors Source: https://learn.microsoft.com/en-us/windows/win32/dxmath/ovw-xmfloat3x3-extensions This section lists the constructors available for the XMFLOAT3X3 structure. ```APIDOC ## XMFLOAT3X3 Constructors ### Description Constructors exposed by `XMFLOAT3X3`. ### Method N/A (Constructors are not typically represented by HTTP methods) ### Endpoint N/A ### Parameters N/A ### Request Example N/A ### Response N/A ``` -------------------------------- ### DirectXMath Quaternion Functions Overview Source: https://learn.microsoft.com/en-us/windows/win32/dxmath/ovw-xnamath-reference-functions-quaternion A list of available functions for quaternion manipulation within the DirectXMath library. ```APIDOC ## DirectXMath Quaternion Functions ### Description The DirectXMath library provides a comprehensive set of functions for quaternion operations, including barycentric coordinates, conjugation, dot products, exponential/logarithmic operations, normalization, and rotation conversions. ### Functions List - **XMQuaternionBaryCentric**: Returns a point in barycentric coordinates. - **XMQuaternionConjugate**: Computes the conjugate of a quaternion. - **XMQuaternionDot**: Computes the dot product of two quaternions. - **XMQuaternionExp**: Computes the exponential of a pure quaternion. - **XMQuaternionIdentity**: Returns the identity quaternion. - **XMQuaternionInverse**: Computes the inverse of a quaternion. - **XMQuaternionLength**: Computes the magnitude of a quaternion. - **XMQuaternionMultiply**: Computes the product of two quaternions. - **XMQuaternionNormalize**: Normalizes a quaternion. - **XMQuaternionRotationAxis**: Computes a rotation quaternion about an axis. - **XMQuaternionSlerp**: Performs spherical linear interpolation between two unit quaternions. - **XMQuaternionSquad**: Performs spherical quadrangle interpolation between four unit quaternions. ``` -------------------------------- ### XMMATRIX Constructors Source: https://learn.microsoft.com/en-us/windows/win32/dxmath/xmmatrix-ctor Overloaded constructors for initializing XMMATRIX instances using different data types. ```APIDOC ## XMMATRIX Constructors ### Description Constructs instances of the XMMATRIX structure. These constructors are available only when developing with C++. ### Overloads - **XMMATRIX(float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float)**: Initializes from sixteen scalar float values. - **XMMATRIX()**: Default constructor. - **XMMATRIX(const float*)**: Initializes from a sixteen element float array. - **XMMATRIX(XMVECTOR, XMVECTOR, XMVECTOR, XMVECTOR)**: Initializes from four instances of XMVECTOR. ``` -------------------------------- ### XMSHORT4 Constructors Source: https://learn.microsoft.com/en-us/windows/win32/dxmath/xmshort4-ctor A list of available constructors for the XMSHORT4 structure, which are exclusively available in C++. ```APIDOC ## XMSHORT4 Constructors ### Description Constructs instances of the XMSHORT4 structure using various input types. These constructors are only available under C++. ### Constructors - **XMSHORT4()**: Default constructor. - **XMSHORT4(const float*)**: Initializes from a four-element float array. - **XMSHORT4(const int16_t*)**: Initializes from a four-element int16_t array. - **XMSHORT4(float, float, float, float)**: Initializes from four individual float arguments. - **XMSHORT4(int16_t, int16_t, int16_t, int16_t)**: Initializes from four individual int16_t arguments. ``` -------------------------------- ### Initialize XMVECTOR with XMVECTORF32 Source: https://learn.microsoft.com/en-us/windows/win32/dxmath/pg-xnamath-migration Use the XMVECTORF32 class for initializing vector constants. This class automatically returns an XMVECTOR and can be used in most contexts where XMVECTOR is expected. Write operations require accessing the .v member. ```cpp XMVECTOR v = { 1.f, 2.f, 3.f, 4.f } ``` -------------------------------- ### BoundingSphere Methods Source: https://learn.microsoft.com/en-us/windows/win32/dxmath/boundingsphere-methods This section outlines the available methods for the BoundingSphere structure. ```APIDOC ## BoundingSphere Methods ### Contains Tests whether the BoundingSphere contains a specified object. ### Intersects Tests the BoundingSphere for intersection with an object. ### Transform Transforms the BoundingSphere. ### ContainedBy Tests whether the BoundingSphere is contained by the specified frustum. ### CreateFromBoundingBox Creates a BoundingSphere containing the specified BoundingBox. ### CreateFromPoints Creates a new BoundingSphere from a list of points. ### CreateMerged Creates a BoundingSphere that contains the two specified BoundingSphere objects. ### op_Assignment Initializes the BoundingSphere with values from a specified BoundingSphere. ``` -------------------------------- ### XMFLOAT4X3 Constructors Source: https://learn.microsoft.com/en-us/windows/win32/dxmath/ovw-xmfloat4x3-extensions Information about the constructors available for the XMFLOAT4X3 structure. ```APIDOC ## XMFLOAT4X3 Constructors ### Description Constructors exposed by `XMFLOAT4X3`. ### Method N/A (Constructors are language-specific) ### Endpoint N/A ### Parameters N/A ### Request Example N/A ### Response N/A ### Response Example N/A ``` -------------------------------- ### XMUINT3 Constructors Source: https://learn.microsoft.com/en-us/windows/win32/dxmath/xmuint3-ctor Overview of the available constructors for the XMUINT3 structure in C++. ```APIDOC ## XMUINT3 Constructors ### Description Constructs instances of the XMUINT3 structure. These constructors are available under C++. ### Overload List - **XMUINT3()**: Default constructor for XMUINT3. - **XMUINT3(const uint32_t*)**: Initializes a new instance of XMUINT3 from a three-element uint32_t array argument. - **XMUINT3(uint32_t, uint32_t, uint32_t)**: Initializes a new instance of XMUINT3 from three uint32_t arguments. ### Requirements - **Header**: DirectXMath.h ``` -------------------------------- ### XMUBYTE2 Constructors Source: https://learn.microsoft.com/en-us/windows/win32/dxmath/xmubyte2-ctor List of available constructors for the XMUBYTE2 structure in C++. ```APIDOC ## XMUBYTE2 Constructors ### Description Constructs instances of the XMUBYTE2 structure. These constructors are available exclusively in C++. ### Constructors - **XMUBYTE2()** - Default constructor for XMUBYTE2. - **XMUBYTE2(float, float)** - Initializes a new instance from two float arguments. - **XMUBYTE2(const float*)** - Initializes a new instance from a two-element float array argument. - **XMUBYTE2(const uint8_t*)** - Initializes a new instance from a two-element int8_t array argument. - **XMUBYTE2(uint8_t, uint8_t)** - Initializes a new instance from two uint8_t arguments. ``` -------------------------------- ### XMFLOAT4 Constructors Source: https://learn.microsoft.com/en-us/windows/win32/dxmath/xmfloat4-ctor Details regarding the available constructors for the XMFLOAT4 structure. ```APIDOC ## XMFLOAT4 Constructors ### Description Constructs instances of the XMFLOAT4 structure. These constructors are available under C++. ### Overload List - **XMFLOAT4()**: Default constructor for XMFLOAT4. - **XMFLOAT4(const float*)**: Initializes a new instance of XMFLOAT4 from a four element float array argument. - **XMFLOAT4(float, float, float, float)**: Initializes a new instance of XMFLOAT4 from four float arguments. ### Requirements - **Header**: Directxmath.h ``` -------------------------------- ### XMUBYTEN2 Structure Overview Source: https://learn.microsoft.com/en-us/windows/win32/dxmath/ovw-xmubyten2-extensions Overview of the XMUBYTEN2 structure, which provides constructors and operators for handling 2D vectors of unsigned 8-bit normalized values. ```APIDOC ## XMUBYTEN2 Structure ### Description XMUBYTEN2 is a 2D vector structure used to store unsigned, normalized values as unsigned 8-bit (1 byte) integers. This structure is available exclusively for C++ development. ### Components - **XMUBYTEN2 Constructors**: Methods for initializing the XMUBYTEN2 structure. - **XMUBYTEN2 Operators**: Operators exposed by the XMUBYTEN2 structure for vector manipulation. ``` -------------------------------- ### XMU555 Constructor Overloads Source: https://learn.microsoft.com/en-us/windows/win32/dxmath/xmu555-ctor A list of available constructors for the XMU555 structure, exclusively for C++ development. ```APIDOC ## XMU555 Constructors ### Description Constructs instances of the XMU555 structure. These constructors are only available under C++. ### Constructors - **XMU555(uint16_t)**: Initializes from a uint16_t variable containing component data in a packed format. - **XMU555(const float*, bool)**: Initializes from a three-element float array (x, y, z) and one bool argument (w). - **XMU555(const int8_t*, bool)**: Initializes from a three-element int8_t array (x, y, z) and one bool argument (w). - **XMU555(float, float, float, bool)**: Initializes from three float arguments (x, y, z) and one bool argument (w). - **XMU555(int8_t, int8_t, int8_t, bool)**: Initializes from three int8_t arguments (x, y, z) and one bool argument (w). - **XMU555()**: Default constructor. ``` -------------------------------- ### XMVectorRotateRight Template Syntax Source: https://learn.microsoft.com/en-us/windows/win32/dxmath/xmvectorrotateright-template This is the template syntax for the XMVectorRotateRight function. Use this when the number of elements to rotate is known at compile time. Requires DirectXMath header. ```cpp template XMVECTOR XMVectorRotateRight( [in] XMVECTOR V ); ``` -------------------------------- ### XMBYTE4 Constructors Source: https://learn.microsoft.com/en-us/windows/win32/dxmath/ovw-xmbyte4-extensions Lists and describes the constructors available for the XMBYTE4 data type in DirectXMath. ```APIDOC ## XMBYTE4 Constructors ### Description This section details the constructors provided for the `XMBYTE4` structure, allowing for the creation and initialization of `XMBYTE4` objects. ``` -------------------------------- ### XMFLOAT2 Constructors and Operators Source: https://learn.microsoft.com/en-us/windows/win32/dxmath/ovw-xmfloat2-extensions This section covers the constructors and operators provided by the XMFLOAT2 structure for creating and manipulating 2D vectors. ```APIDOC ## XMFLOAT2 Constructors and Operators ### Description Provides details on the constructors and operators available for the XMFLOAT2 structure, which represents a 2D vector of single-precision floating-point values. ### Constructors - **XMFLOAT2()**: Default constructor. - **XMFLOAT2(float _x, float _y)**: Constructor initializing with x and y values. - **XMFLOAT2(const XMFLOAT2& _V)**: Copy constructor. ### Operators - **operator=**: Assignment operator. - **operator==**: Equality comparison operator. - **operator!=**: Inequality comparison operator. ### Note These features are primarily intended for use in C++ development. ``` -------------------------------- ### XMDEC4 Constructors Source: https://learn.microsoft.com/en-us/windows/win32/dxmath/xmdec4-ctor Overview of the available constructors for the XMDEC4 structure. ```APIDOC ## XMDEC4 Constructors ### Description Constructs instances of the XMDEC4 structure. These constructors are only available under C++. ### Constructors - **XMDEC4(uint32_t)**: Initializes a new instance of XMDEC4 from a uint32_t variable containing component data in a packed format. - **XMDEC4(const float*)**: Initializes a new instance of XMDEC4 from a four element float array argument. - **XMDEC4(float, float, float, float)**: Initializes a new instance of XMDEC4 from four float arguments. - **XMDEC4()**: Default constructor for XMDEC4. ``` -------------------------------- ### XMUINT2 Constructors and Operators Source: https://learn.microsoft.com/en-us/windows/win32/dxmath/ovw-xmuint2-extensions This section provides documentation for the constructors and operators associated with the XMUINT2 structure in DirectXMath. These are used for creating and manipulating 2D vectors of unsigned integers. ```APIDOC ## XMUINT2 Constructors ### Description Constructors exposed by `XMUINT2`. ### Related Topics * XMUINT2 Operators ``` ```APIDOC ## XMUINT2 Operators ### Description Operators exposed by `XMUINT2`. ### Related Topics * XMUINT2 Constructors ``` -------------------------------- ### XMUBYTE4 Constructors Source: https://learn.microsoft.com/en-us/windows/win32/dxmath/xmubyte4-ctor A list of available constructors for the XMUBYTE4 structure, exclusively for C++ usage. ```APIDOC ## XMUBYTE4 Constructors ### Description Constructs instances of the XMUBYTE4 structure using various input formats. These constructors are available only under C++. ### Overloads - **XMUBYTE4()**: Default constructor. - **XMUBYTE4(uint32_t)**: Initializes from a packed uint32_t variable. - **XMUBYTE4(const float*)**: Initializes from a four-element float array. - **XMUBYTE4(const uint8_t*)**: Initializes from a four-element uint8_t array. - **XMUBYTE4(float, float, float, float)**: Initializes from four individual float arguments. - **XMUBYTE4(uint8_t, uint8_t, uint8_t, uint8_t)**: Initializes from four individual uint8_t arguments. ``` -------------------------------- ### XMUBYTEN2 Constructors Source: https://learn.microsoft.com/en-us/windows/win32/dxmath/xmubyten2-ctor Constructors exposed by XMUBYTEN2. These are only available with C++. ```APIDOC ## XMUBYTEN2 Constructors ### Description Constructs instances of the XMUBYTEN2 structure. ### Method Constructor ### Endpoint N/A (C++ Class Constructor) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) An instance of the XMUBYTEN2 structure. #### Response Example None ## Overload List ### XMUBYTEN2 () #### Description Default constructor for `XMUBYTEN2`. #### Method Constructor ### XMUBYTEN2 (float, float) #### Description Initializes a new instance of `XMUBYTEN2` from two `float` arguments. #### Method Constructor ### _XMUBYTEN2 (const float*) #### Description Initializes a new instance of `XMUBYTEN2` from a two-element `float` array argument. #### Method Constructor ### _XMUBYTEN2 (const uint8_t*) #### Description Initializes a new instance of `XMUBYTEN2` from a two-element `uint8_t` array argument. #### Method Constructor ### XMUBYTEN2 (uint8_t, uint8_t) #### Description Initializes a new instance of `XMUBYTEN2` from two `uint8_t` arguments. #### Method Constructor ```