31 XMStoreFloat4x4(&matrix, m_TranslateMatrix);
32 matrix._41 = XMVectorGetX(position);
33 matrix._42 = XMVectorGetY(position);
34 matrix._43 = XMVectorGetZ(position);
35 m_TranslateMatrix = XMLoadFloat4x4(&matrix);
54 XMStoreFloat4x4(&matrix, m_ScaleMatrix);
55 matrix._11 = XMVectorGetX(scale);
56 matrix._22 = XMVectorGetY(scale);
57 matrix._33 = XMVectorGetZ(scale);
58 m_ScaleMatrix = XMLoadFloat4x4(&matrix);
78 XMStoreFloat4x4(&matrix, m_RotateMatrix);
79 float rotationX = atan2f(matrix._32, matrix._33);
80 float rotationY = atan2f(-matrix._31, sqrtf(matrix._32 * matrix._32 + matrix._33 * matrix._33));
81 float rotationZ = atan2f(matrix._21, matrix._11);
82 return XMVectorSet(rotationX, rotationY, rotationZ, 0.0f);
91 XMStoreFloat4x4(&matrix, m_ScaleMatrix);
93 XMVECTOR row1 = XMLoadFloat3(
reinterpret_cast<XMFLOAT3*
>(&matrix._11));
94 XMVECTOR row2 = XMLoadFloat3(
reinterpret_cast<XMFLOAT3*
>(&matrix._21));
95 XMVECTOR row3 = XMLoadFloat3(
reinterpret_cast<XMFLOAT3*
>(&matrix._31));
97 XMVECTOR scale = XMVectorSet(
98 XMVectorGetX(XMVector3Length(row1)),
99 XMVectorGetX(XMVector3Length(row2)),
100 XMVectorGetX(XMVector3Length(row3)),