Events
Nov 19, 11 PM - Nov 21, 11 PM
Gain the competitive edge you need with powerful AI and Cloud solutions by attending Microsoft Ignite online.
Register nowThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
The D3DX utility library is deprecated. We recommend that you use DirectXMath instead along with this header from GitHub.
Rotates (relative to world coordinate space) around an arbitrary axis.
HRESULT RotateAxis(
[in] const D3DXVECTOR3 *pV,
[in] FLOAT Angle
);
pV [in]
Type: const D3DXVECTOR3*
Pointer to the arbitrary axis of rotation. See D3DXVECTOR3.
Angle [in]
Type: FLOAT
Rotation angle about the arbitrary axis, in radians. Angles are measured counterclockwise when looking along the arbitrary axis toward the origin.
Type: HRESULT
If the method succeeds, the return value is D3D_OK. If the method fails, the return value can be D3DERR_INVALIDCALL.
This method adds the rotation to the matrix stack with the computed rotation matrix similar to the following:
D3DXMATRIX tmp;
D3DXMatrixRotationAxis( &tmp, pV, angle );
m_stack[m_currentPos] = m_stack[m_currentPos] * tmp;
Because the rotation is right-multiplied to the matrix stack, the rotation is relative to world coordinate space.
Requirement | Value |
---|---|
Header |
|
Library |
|
Events
Nov 19, 11 PM - Nov 21, 11 PM
Gain the competitive edge you need with powerful AI and Cloud solutions by attending Microsoft Ignite online.
Register now