\input manualMacros.tex
\manBegin
\manPageInfo{RCCL Reference Manual}{}{}
\manTitle{multTrsf}{3}
\manSection{NAME}
{\rightskip=0ptplus1fil
{\tt \manName{multTrsf}},
{\tt \manName{multLiTrsf}},
{\tt \manName{multRiTrsf}},
{\tt \manName{invertTrsf}},
{\tt \manName{identTrsf}},
{\tt \manName{unitTrsf}}
-- RCCL routines to multiply, invert, and initialize transforms.
}
\manSection{USAGE}
\cverbatim
#include <robotTypes.h> /* included as part of <rccl.h> */

TRSF *multTrsf (tr, t1, t2)
  TRSF *tr, *t1, *t2;

TRSF *multLiTrsf (tr, t1, t2)
  TRSF *tr, *t1, *t2;

TRSF *multRiTrsf (tr, t1, t2)
  TRSF *tr, *t1, *t2;

TRSF *invertTrsf (tr, t1)
  TRSF *tr, *t1;

TRSF *identTrsf (tr)
  TRSF *tr;

TRSF *unitTrsf (tr)
  TRSF *tr;
@endcverbatim
\manSection{ARGUMENTS}
\manItem{{\tt tr} --}
Result transform (and input transform in the case of {\TT identTrsf()}
and {\tt unitTrsf()}).
\manItem{{\tt t1}, {\tt t2} --}
Input transforms.
\manSection{DESCRIPTION}
These routines perform operations on the $4\times4$ homogeneous transform
data type {\tt TRSF}.

{\tt multTrsf()} computes the product
\manIfTeX
$$
{\bf TR} \;=\; {\bf T1} \; {\bf T2}.
$$
\manElse
\cverbatim

                TR = T1 T2 .
@endcverbatim
\manFi

{\tt multLiTrsf()} computes the product
\manIfTeX
$$
{\bf TR} \;=\; {\bf T1}^{-1} \; {\bf T2}.
$$
\manElse
\cverbatim

                       -1
                TR = T1   T2 .
@endcverbatim
\manFi

{\tt multRiTrsf()} computes the product
\manIfTeX
$$
{\bf TR} \;=\; {\bf T1} \; {\bf T2}^{-1}.
$$
\manElse
\cverbatim

                          -1
                TR = T1 T2 .
@endcverbatim
\manFi

{\tt invertTrsf()} computes the inverse of a transform:
\manIfTeX
$$
{\bf TR} \;=\; {\bf T1}^{-1}.
$$
\manElse
\cverbatim

                       -1
                TR = T1 .
@endcverbatim
\manFi

{\tt identTrsf()} sets {\tt tr} to the identity transform.

{\tt unitTrsf()} normalizes the {\bf n}, {\bf o}, and {\bf a} rotation vectors
of {\tt tr} according to the following 
algorithm:
\manIfTeX
$$
\eqalign{
        {\bf a} = \; & {\bf a} / | {\bf a} | \cr
        {\bf n} = \; & ({\bf o} \times {\bf a}) / |{\bf o} \times {\bf a}| \cr
        {\bf o} = \; & {\bf a} \times {\bf n} \cr}
$$
\manElse
\cverbatim
                a = a / |a|
                n = (o X a) / |o X a|
                o = a X n @endcverbatim
\manFi

Each of these routines returns a pointer to its result argument.

\manSection{SEE ALSO}
\rightskip=0ptplus1fil
{\tt xyzToTrsf(3)}, {\tt vaoToTrsf(3)}, {\tt rotToTrsf(3)}, {\tt eulToTrsf(3)}, {\tt rpyToTrsf(3)}. 
\manEnd
\end
