Synopsis

PDX_MSGT mth_GetRotMatrixFromPnts(long npnts, MTH_3DPNT (*pnts), double *matrix)

Purpose

Get the 3X3 rotation matrix defined by the plane of the points

Description

Using the first three non-coincident, non-colinear points determines the corresponding 3X3 rotation matrix that rotates the points to the XY plane.

Input

npnts

The number of points in the pnts array

pnts

The XYZ 3D points array

Output

matrix

The 3X3 rotation matrix.

Return

      MTH_NOERR
      MTH_COLINEARPLANEPNTS
      .fi