Synopsis

PDX_MSGT mth_MatrixTranslateAlongAxis(long option, MTH_3DPNT point, MTH_3DVEC vec, double distance, double *matrix)

Purpose

Find the transformation matrix for a translation along an axis

Description

Find the transformation matrix for a translation along an axis. The matrix can be used to move any object along 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 moved along an arbitray axis in space through a distance that 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

distance

The distance of translation (+/-)

Output

matrix

The transformation matrix [12 or 16]

Return

      MTH_NOERR
      Low level error return
      .fi