Jump to content

  • Log In with Google      Sign In   
  • Create Account


#Actualbelfegor

Posted 06 April 2013 - 06:05 AM

As i can see In D3DX first params is almost (if not always) an output value/parameter, the same thing it returns. Now it is removed and you just use returned value.

 

Although this confuses me too, shouldn't  here be Vec3TransformNormal instead Vec3TransformCoord since we are talking about directions?

 

// "dx11"
camTarget = XMVector3TransformCoord(DefaultForward, camRotationMatrix );
 
// "dx9"
D3DXVec3TransformCoord(&camTarget, &DefaultForward, &camRotationMatrix);
 
// although you could use return value if you need to fill some variable with same values as camTarget receives from this function
otherVec3 = *D3DXVec3TransformCoord(&camTarget, &DefaultForward, &camRotationMatrix);

 

 

// "dx11"
camRotationMatrix = XMMatrixRotationRollPitchYaw(camPitch, camYaw, 0);
 
// "dx9"
D3DXMatrixRotationRollPitchYaw(&camRotationMatrix, camPitch, camYaw, 0);

#1belfegor

Posted 06 April 2013 - 06:04 AM

As i can see In D3DX first params is almost (if not always) a out value, same thing it returns. Now it is removed and you just use returned value.

 

Although this confuses me too, shouldn't  here be Vec3TransformNormal instead Vec3TransformCoord since we are talking about directions?

// "dx11"
camTarget = XMVector3TransformCoord(DefaultForward, camRotationMatrix );
 
// "dx9"
D3DXVec3TransformCoord(&camTarget, &DefaultForward, &camRotationMatrix);
 
// although you could use return value if you need to fill some variable with same values as camTarget receives from this function
otherVec3 = *D3DXVec3TransformCoord(&camTarget, &DefaultForward, &camRotationMatrix);

 

// "dx11"
camRotationMatrix = XMMatrixRotationRollPitchYaw(camPitch, camYaw, 0);
 
// "dx9"
D3DXMatrixRotationRollPitchYaw(&camRotationMatrix, camPitch, camYaw, 0);

PARTNERS