0
세계 행렬에서 행을 추출하여 벡터로 가져 오려고합니다. 앞으로 함수를 호출하면 평면이 앞으로 이동합니다. 현재이 작업을하고 있지만 멤버에게 직접 액세스합니다. 행렬에서 행을 자동으로 가져 오는 함수가 있습니까?벡터에 저장할 XMMATRIX에서 행 추출하기
// [Skip this step first time through] Get the forward vector out of the world matrix and put it in m_vForwardVector
XMFLOAT4X4 f44; //create a 4x4 float
XMStoreFloat4x4(&f44, m_mWorldMatrix); //pass the world matrix into the 4x4 float
m_vForwardVector = XMVectorSet(f44._31, f44._32, f44._33, f44._34); //pass the forward vector values from the world matrix into the forward vector
당신은 [SimpleMath]에서 살펴 봐야 할 수 있습니다 상상보다 훨씬 간단 그것을 밖으로 일했다 DirectXMath에 대한 DirectXTK/wiki/SimpleMath) 래퍼. –