Synopsis

PDX_MSGT mth_MatrixRotateAboutAxis(long option, MTH_3DPNT point, MTH_3DVEC vec, double angle, double *matrix)

Purpose

Find the transformation matrix for a rotation about an axis

Description

Find the transformation matrix for a rotation about an axis. The matrix can be used to rotate any object about the axis.

The matrix can be in either Homogeneous format (4x4) or GDX_MATRIX format (3x4) by choosing different option.

It is assumed that the object is rotated about an arbitray axis in space through an angle that follows the right hand rule and can be either + or -.

Input

option

MTH_HOMOGENEOUS

The matrix will be in Homogeneous format (4x4); otherwise, in GDX_MATRIX format (3x4).

point

A point on the axis of rotation

vec

The vector of the axis

angle

The angle of rotation (+/-, in radians)

Output

matrix

The transformation matrix [12]

Return

      MTH_NOERR
      Low level error return
      .fi