javax.robotics.vecmath
Class RMatrix4d

java.lang.Object
  extended by javax.vecmath.Matrix4d
      extended by javax.robotics.vecmath.RMatrix4d
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class RMatrix4d
extends javax.vecmath.Matrix4d

A double precision floating point 4 by 4 matrix. Primarily to support 3D rotations and translations. This class extends printing functionality of Matrix4d class

Since:
1.0.1
Version:
5/10/2005
Author:
Carmine Lia
See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.vecmath.Matrix4d
m00, m01, m02, m03, m10, m11, m12, m13, m20, m21, m22, m23, m30, m31, m32, m33
 
Constructor Summary
RMatrix4d()
          Constructs and initializes a Matrix4d to all zeros.
RMatrix4d(double[] matrix)
          Constructs and initializes a Matrix4d from the specified 16 element array. this.m00 =matrix[0], this.m01=matrix[1], ... , this.m10=matrix[4], etc.
RMatrix4d(javax.vecmath.Matrix4d matrix)
          Constructs a new matrix with the same values as the Matrix4d parameter.
RMatrix4d(Quaternion rot, RVector3d tr, double s)
          Constructs and initializes a RMatrix4d from the quaternion, translation, and scale values; the scale is applied only to the rotational components of the matrix (upper 3x3) and not to the translational components.
RMatrix4d(RMatrix3d rot, RVector3d tr, double s)
          Constructs and initializes a RMatrix4f from the rotation matrix, translation, and scale values; the scale is applied only to the rotational components of the matrix (upper 3x3) and not to the translational components of the matrix.
RMatrix4d(RMatrix4d matrix)
          Constructs a new matrix with the same values as the RMatrix4d parameter.
 
Method Summary
 void get(double[] matrix)
          Gets this matrix as mono dimensional array
 void printf()
          Prints to standard out
 void printf(java.io.PrintStream out)
          Prints to PrintStream
 void printf(java.io.PrintStream out, java.lang.String format)
          Prints to PrintStream according to the format string
 void printf(java.lang.String format)
          Prints to standard out according to the format string.
 java.lang.String toString()
          Returns a string that contains the values of this RVector.
 java.lang.String toString(java.lang.String format)
          Returns a string that contains the values of this RVector, according to the format string
 
Methods inherited from class javax.vecmath.Matrix4d
add, add, add, add, clone, determinant, epsilonEquals, epsilonEquals, equals, equals, get, get, get, get, get, get, get, getColumn, getColumn, getElement, getRotationScale, getRotationScale, getRow, getRow, getScale, hashCode, invert, invert, mul, mul, mul, mul, mulTransposeBoth, mulTransposeLeft, mulTransposeRight, negate, negate, rotX, rotY, rotZ, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, setColumn, setColumn, setColumn, setElement, setIdentity, setRotation, setRotation, setRotation, setRotation, setRotation, setRotationScale, setRotationScale, setRow, setRow, setRow, setScale, setTranslation, setZero, sub, sub, transform, transform, transform, transform, transform, transform, transform, transform, transform, transform, transform, transform, transpose, transpose
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RMatrix4d

public RMatrix4d(javax.vecmath.Matrix4d matrix)
Constructs a new matrix with the same values as the Matrix4d parameter.

Parameters:
matrix - the source matrix

RMatrix4d

public RMatrix4d(RMatrix4d matrix)
Constructs a new matrix with the same values as the RMatrix4d parameter.

Parameters:
matrix - the source matrix

RMatrix4d

public RMatrix4d()
Constructs and initializes a Matrix4d to all zeros.


RMatrix4d

public RMatrix4d(double[] matrix)
Constructs and initializes a Matrix4d from the specified 16 element array. this.m00 =matrix[0], this.m01=matrix[1], ... , this.m10=matrix[4], etc.

Parameters:
matrix - the array of length 16 containing in order

RMatrix4d

public RMatrix4d(RMatrix3d rot,
                 RVector3d tr,
                 double s)
Constructs and initializes a RMatrix4f from the rotation matrix, translation, and scale values; the scale is applied only to the rotational components of the matrix (upper 3x3) and not to the translational components of the matrix.

Parameters:
rot - the rotation matrix representing the rotational components
tr - the translational components of the matrix
s - the scale value applied to the rotational components

RMatrix4d

public RMatrix4d(Quaternion rot,
                 RVector3d tr,
                 double s)
Constructs and initializes a RMatrix4d from the quaternion, translation, and scale values; the scale is applied only to the rotational components of the matrix (upper 3x3) and not to the translational components.

Parameters:
rot - the quaternion value representing the rotational component
tr - the translational components of the matrix
s - the scale value applied to the rotational components
Method Detail

printf

public void printf()
Prints to standard out


printf

public void printf(java.lang.String format)
Prints to standard out according to the format string.

The format specifiers for numeric types have the following syntax:

%[width][.precision]conversion

Example:
v.printf("%5.3f");

Parameters:
format - The format string
See Also:
PrintStream.format(java.lang.String, java.lang.Object[])

printf

public void printf(java.io.PrintStream out)
Prints to PrintStream

Parameters:
out - The PrintStream object.

printf

public void printf(java.io.PrintStream out,
                   java.lang.String format)
Prints to PrintStream according to the format string

Parameters:
out - The PrintStream object.
format - The format string.
See Also:
printf(String)

toString

public java.lang.String toString()
Returns a string that contains the values of this RVector.

Overrides:
toString in class javax.vecmath.Matrix4d
Returns:
The string.

toString

public java.lang.String toString(java.lang.String format)
Returns a string that contains the values of this RVector, according to the format string

Parameters:
format - The format string
Returns:
The string
See Also:
printf(String)

get

public void get(double[] matrix)
Gets this matrix as mono dimensional array

Parameters:
matrix - the array