BolterLibrary.NativeDx.GetNewVector C# (CSharp) Method

GetNewVector() protected static method

protected static GetNewVector ( float heading ) : D3DXVECTOR2
heading float
return D3DXVECTOR2
        protected static D3DXVECTOR2 GetNewVector(float heading)
        {
            D3DXMATRIX updatedMatrix;
            D3DXMATRIX transMatrix;
            D3DXMATRIX yRotationMatrix;

            //Set up the rotation matrix for the player model
            D3DXMatrixRotationY(out yRotationMatrix, heading / 2);

            //Set up the translation matrix
            D3DXMatrixTranslation(out transMatrix, 0.0f, 0.0f, 0.0f);

            //Combine out matrices
            D3DXMatrixMultiply(out updatedMatrix, ref yRotationMatrix, ref transMatrix);

            //Return new vector for player matrix.
            return new D3DXVECTOR2(updatedMatrix._31, updatedMatrix._33);
        }