XMMatrixRotationAxis

Builds a matrix that rotates around an arbitrary axis.

Syntax

XMMATRIX XMMatrixRotationAxis(
         XMVECTOR Axis,
         float Angle
)  

Parameters

Axis
Type: XMVECTOR 

Vector describing the axis of rotation.

Angle
Type: float 

Angle of rotation in radians. Angles are measured clockwise when looking along the rotation axis toward the origin.

Return value

Type: XMMATRIX 

Returns the rotation matrix.

Remarks

If Axis is a normalized vector, it is faster to use the XMMatrixRotationNormal function to build this type of matrix.

Requirements

Header: Declared in directxmath.h.