Class JsMat3D

java.lang.Object
  extended byJsMat3D

public class JsMat3D
extends java.lang.Object


Constructor Summary
JsMat3D(double[] Data)
          Constructor
JsMat3D(double angle, double[] axis)
          Calculate the 3x3 rotation matrix generated by a rotation of a specified angle about a specified axis.
JsMat3D(double x11, double x12, double x13, double x21, double x22, double x23, double x31, double x32, double x33)
          Constructor
JsMat3D(double angle, int axis)
          Calculate the 3x3 rotation matrix generated by a rotation of a specified angle about a specified axis.
JsMat3D(JsEulAngle eulAng)
          Constructor
JsMat3D(JsQuat q)
          Find the rotation matrix corresponding to a specified unit quaternion
JsMat3D(java.lang.String from, java.lang.String to, JsDate date)
          Constructor the rotation matrix from one frame to another at a specified epoch ( call PXFORM)
 
Method Summary
 double det()
          Return the trace of a 3x3 matrix
 double[] getData()
          Constructor
 JsMat3D ident()
          This routine returns the 3x3 identity matrix
 JsMat3D invert()
          Generate the inverse of a 3x3 matrix
 boolean isRot(double ntol, double dtol)
          Indicate whether a 3x3 matrix is a rotation matrix
 JsEulAngle toEulAngle()
          Factor a rotation matrix as a product of three rotations about specified coordinate axes
 JsQuat toQuat()
          Find a unit quaternion corresponding to a specified rotation matrix.
 double trace()
          Return the trace of a 3x3 matrix
 JsMat3D txm(JsMat3D m2)
          Multiply the transpose of a 3x3 matrix and a 3x3 matrix
 JsVect3D txv(JsVect3D v)
          multiplies the transpose of a 3x3 matrix on the left with a vector on the right
 JsMat3D xm(JsMat3D m2)
          Multiply a 3x3 matrix and a 3x3 matrix
 JsMat3D xmt(JsMat3D m2)
          Multiply a 3x3 matrix and the transpose of a 3x3 matrix
 JsMat3D xpose()
          Transpose a 3x3 matrix
 JsVect3D xv(JsVect3D v)
          multipliesa 3x3 matrix on the left with a vector on the right
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JsMat3D

public JsMat3D(double[] Data)
Constructor


JsMat3D

public JsMat3D(double x11,
               double x12,
               double x13,
               double x21,
               double x22,
               double x23,
               double x31,
               double x32,
               double x33)
Constructor


JsMat3D

public JsMat3D(JsEulAngle eulAng)
Constructor


JsMat3D

public JsMat3D(double angle,
               int axis)
Calculate the 3x3 rotation matrix generated by a rotation of a specified angle about a specified axis. This rotation is thought of as rotating the coordinate system


JsMat3D

public JsMat3D(double angle,
               double[] axis)
Calculate the 3x3 rotation matrix generated by a rotation of a specified angle about a specified axis. This rotation is thought of as rotating the coordinate system


JsMat3D

public JsMat3D(JsQuat q)
Find the rotation matrix corresponding to a specified unit quaternion


JsMat3D

public JsMat3D(java.lang.String from,
               java.lang.String to,
               JsDate date)
        throws java.lang.Exception
Constructor the rotation matrix from one frame to another at a specified epoch ( call PXFORM)

Method Detail

getData

public double[] getData()
Constructor


ident

public JsMat3D ident()
              throws java.lang.Exception
This routine returns the 3x3 identity matrix

Returns:
is the 3x3 Identity matrix. That is MATRIX is the following

_ _ | 1.0 0.0 0.0 |
| 0.0 1.0 0.0 |
| 0.0 0.0 1.0 |
- -
Throws:
java.lang.Exception

xpose

public JsMat3D xpose()
              throws java.lang.Exception
Transpose a 3x3 matrix

Returns:
This variable is a double precision, 3x3 matrix which contains the transpose of m1
Throws:
java.lang.Exception

txm

public JsMat3D txm(JsMat3D m2)
            throws java.lang.Exception
Multiply the transpose of a 3x3 matrix and a 3x3 matrix

Parameters:
m2 - is any 3x3 double precision matrix. Typically, m1 will be a rotation matrix since then its transpose is its inverse (but this is not a requirement).
Returns:
Throws:
java.lang.Exception

txv

public JsVect3D txv(JsVect3D v)
             throws java.lang.Exception
multiplies the transpose of a 3x3 matrix on the left with a vector on the right

Parameters:
v - is an arbitrary 3-dimensional double precision vector
Returns:
is a 3-dimensional double precision vector. vout is the product vout = (m1**t) x (vin).
Throws:
java.lang.Exception

xv

public JsVect3D xv(JsVect3D v)
            throws java.lang.Exception
multipliesa 3x3 matrix on the left with a vector on the right

Parameters:
v - is an arbitrary 3-dimensional double precision vector
Returns:
is a 3-dimensional double precision vector. vout is the product vout = m1 x (vin).
Throws:
java.lang.Exception

xm

public JsMat3D xm(JsMat3D m2)
           throws java.lang.Exception
Multiply a 3x3 matrix and a 3x3 matrix

Parameters:
m2 - is any 3x3 double precision matrix.
Returns:
Throws:
java.lang.Exception

xmt

public JsMat3D xmt(JsMat3D m2)
            throws java.lang.Exception
Multiply a 3x3 matrix and the transpose of a 3x3 matrix

Parameters:
m2 - is any 3x3 double precision matrix.
Returns:
Throws:
java.lang.Exception

trace

public double trace()
             throws java.lang.Exception
Return the trace of a 3x3 matrix

Returns:
is the trace of matrix, i.e. it is the sum of the diagonal elements of matrix
Throws:
java.lang.Exception

det

public double det()
           throws java.lang.Exception
Return the trace of a 3x3 matrix

Returns:
is the trace of matrix, i.e. it is the sum of the diagonal elements of matrix
Throws:
java.lang.Exception

isRot

public boolean isRot(double ntol,
                     double dtol)
              throws java.lang.Exception
Indicate whether a 3x3 matrix is a rotation matrix

Parameters:
ntol - Tolerance for the norms of the columns of m.
dtol - Tolerance for the determinant of a matrix whose columns are the unitized columns of m.
Returns:
This routine is an error checking "filter"; its purpose is to detect gross errors, such as uninitialized matrices. Matrices that do not pass the tests used by this routine hardly qualify as rotation matrices. The test criteria can be adjusted by varying the parameters ntol and dtol.
Throws:
java.lang.Exception

invert

public JsMat3D invert()
               throws java.lang.Exception
Generate the inverse of a 3x3 matrix

Returns:
is the inverse of m1 and is calculated explicitly using the matrix of cofactors. mout is set to be the zero matrix if m1 is singular
Throws:
java.lang.Exception

toEulAngle

public JsEulAngle toEulAngle()
                      throws java.lang.Exception
Factor a rotation matrix as a product of three rotations about specified coordinate axes

Returns:
Throws:
java.lang.Exception

toQuat

public JsQuat toQuat()
              throws java.lang.Exception
Find a unit quaternion corresponding to a specified rotation matrix.

Returns:
Throws:
java.lang.Exception