XMFLOAT4X4 structure

A 4*4 floating point matrix.

For a list of additional functionality such as constructors and operators that are available using XMFLOAT4X4 when you are programming in C++, see XMFLOAT4X4 Extensions.

Note  See DirectXMath Library Type Equivalences for information about equivalent D3DDECLTYPE, D3DFORMAT, and DXGI_FORMAT objects.
 

Syntax

struct XMFLOAT4X4 {
  union {
    struct {
      float _11;
      float _12;
      float _13;
      float _14;
      float _21;
      float _22;
      float _23;
      float _24;
      float _31;
      float _32;
      float _33;
      float _34;
      float _41;
      float _42;
      float _43;
      float _44;
    };
    float m[4];
  };
  void         XMFLOAT4X4();
  void         XMFLOAT4X4( const float *pArray);
  void         XMFLOAT4X4( const XMFLOAT4X4 & );
  XMFLOAT4X4 & operator=( const XMFLOAT4X4 & );
  void         XMFLOAT4X4( XMFLOAT4X4 && );
  XMFLOAT4X4 & operator=( XMFLOAT4X4 && );
  XM_CONSTEXPR XMFLOAT4X4( 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);
  float        operator()( size_t Row, size_t Column);
  float &      operator()( size_t Row, size_t Column);
};

Members

_11

An element of the matrix.

_12

An element of the matrix.

_13

An element of the matrix.

_14

An element of the matrix.

_21

An element of the matrix.

_22

An element of the matrix.

_23

An element of the matrix.

_24

An element of the matrix.

_31

An element of the matrix.

_32

An element of the matrix.

_33

An element of the matrix.

_34

An element of the matrix.

_41

An element of the matrix.

_42

An element of the matrix.

_43

An element of the matrix.

_44

An element of the matrix.

m

A 4*4 array representing the matrix.

````cpp void XMFLOAT4X4()`

Default constructor for XMFLOAT4X4

Default constructor for XMFLOAT4X4

Note  This is only available for C++ based development.
 

````cpp void XMFLOAT4X4( const float *pArray)`

Initializes a new instance of the XMFLOAT4X4 structure from a sixteen element float array.

Initializes a new instance of the XMFLOAT4X4 structure from a sixteen element float array.

Note  This constructor is only available under C++.
 

````cpp void XMFLOAT4X4( const XMFLOAT4X4 & )`

Default constructor for XMFLOAT4X4

Default constructor for XMFLOAT4X4

Note  This is only available for C++ based development.
 

````cpp XMFLOAT4X4 & operator=( const XMFLOAT4X4 & )`

Assigns the vector component data from one instance of XMFLOAT4X4 to the current instance of XMFLOAT4X4.

This operator assigns the vector component data from one instance of XMFLOAT4X4 to the current instance of XMFLOAT4X4.

Note  This operator is only available under C++.
 

````cpp void XMFLOAT4X4( XMFLOAT4X4 && )`

Default constructor for XMFLOAT4X4

Default constructor for XMFLOAT4X4

Note  This is only available for C++ based development.
 
XMFLOAT4X4 & operator=(  XMFLOAT4X4 && )`





[````cpp
XM_CONSTEXPR XMFLOAT4X4(  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)`](nf-directxmath-xmfloat4x4-xmfloat4x4(float_float_float_float_float_float_float_float_float_float_float_float_float_float_float_float).md)

Initializes a new instance of the <code>XMFLOAT4X4</code> structure from sixteen scalar
	<code>float</code> values.
    

Initializes a new instance of the <a href="https://docs.microsoft.com/windows/desktop/api/directxmath/ns-directxmath-xmfloat4x4">XMFLOAT4X4</a> structure from sixteen
	scalar <code>float</code> values.
<div class="alert"><b>Note</b>  This constructor is only available under C++.
    </div><div> </div>



````cpp
float operator()(  size_t Row,  size_t Column)`





[````cpp
float & operator()(  size_t Row,  size_t Column)`](nf-directxmath-xmfloat4x4-operator-function-call(size_t_size_t).md)

Returns a <code>reference</code> to a matrix element of an instance <code>XMFLOAT4X4</code> as specified by row and column
  arguments.
<div class="alert"><b>Note</b>  This operator is only available under C++.</div><div> </div>



## Remarks
Scalar members of <code>XMFLOAT4X4</code> are of the form <b>_</b><i>RowCol</i>, and provide one based indexing,
   where <i>Row</i> specifies the one's based matrix row (running from 1 to 4), and
   <i>Col</i> specifies the one's based matrix column (running from 1 to 4).

The two dimensional 4*4 array member of <code>XMFLOAT4X4</code>, <b>m</b>, provides zero based indexing of the structure's
   matrix. When accessing <code>XMFLOAT4X4</code><b>m[</b><i>Row</i><b>,</b><i>Col</i><b>]</b>, <i>Row</i> can run from 0 to 3 and <i>Col</i> can run from 0 to 3.

<code>XMFLOAT4X4</code> can be loaded into instances of <a href="https://docs.microsoft.com/windows/desktop/dxmath/xmvector-data-type"> XMVECTOR</a> by using
   <a href="https://msdn.microsoft.com/51c2a4e8-99c9-4a3d-8fe4-06b534693146">XMLoadFloat4x4</a>.

Instances of <code>XMVECTOR</code> can be stored into an instance of <code>XMFLOAT4X4</code> with
   <a href="https://msdn.microsoft.com/8d569b41-a22c-419e-a50a-eaab20a6a8a2">XMStoreFloat4x4</a>.

<b>Namespace:</b> Use DirectX

<h3><a id="Platform_Requirements"></a><a id="platform_requirements"></a><a id="PLATFORM_REQUIREMENTS"></a>Platform Requirements</h3>
Microsoft Visual Studio 2010 or Microsoft Visual Studio 2012 with the Windows SDK for Windows 8. Supported for Win32 desktop apps, Windows Store apps, and Windows Phone 8 apps.


## Requirements
| &nbsp; | &nbsp; |
| ---- |:---- |
| **Header** | directxmath.h |

## See Also

<a href="https://docs.microsoft.com/windows/desktop/dxmath/ovw-xnamath-reference-structures">DirectXMath Library Structures</a>



<a href="https://msdn.microsoft.com/ae6a5159-4a77-488c-a836-da3a16e7fcaf">XMFLOAT4X4 Extensions</a>



<a href="https://msdn.microsoft.com/64dd4128-103b-4d54-98f3-cc908170d81c">XMMATRIX</a>