javax.robotics.vecmath
Class RMatrix3d

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

public class RMatrix3d
extends javax.vecmath.Matrix3d

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

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

Field Summary
 
Fields inherited from class javax.vecmath.Matrix3d
m00, m01, m02, m10, m11, m12, m20, m21, m22
 
Constructor Summary
RMatrix3d()
          Constructs and initializes a RMatrix3d to all zeros.
RMatrix3d(double[] matrix)
          Constructs and initializes a RMatrix3d from the specified nine element array. this.m00=matrix[0], this.m01=matrix[1], ... , this.m10=matrix[3], etc.
RMatrix3d(javax.vecmath.Matrix3d matrix)
          Constructs a new matrix with the same values as the Matrix3d parameter.
RMatrix3d(RMatrix3d matrix)
          Constructs a new matrix with the same values as the RMatrix3d parameter.
 
Method Summary
 Quaternion getQuaternion()
          Get the quaternion from this matrix.
 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.
 void S(RVector3d w)
          Gets S matrix.
 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.Matrix3d
add, add, add, add, clone, determinant, epsilonEquals, equals, equals, getColumn, getColumn, getElement, getRow, getRow, getScale, hashCode, invert, invert, mul, mul, mul, mul, mulNormalize, mulNormalize, mulTransposeBoth, mulTransposeLeft, mulTransposeRight, negate, negate, normalize, normalize, normalizeCP, normalizeCP, rotX, rotY, rotZ, set, set, set, set, set, set, set, set, setColumn, setColumn, setColumn, setElement, setIdentity, setRow, setRow, setRow, setScale, setZero, sub, sub, transform, transform, transpose, transpose
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RMatrix3d

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

Parameters:
matrix - the 3 x 3 source matrix

RMatrix3d

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

Parameters:
matrix - the 3 x 3 source matrix

RMatrix3d

public RMatrix3d()
Constructs and initializes a RMatrix3d to all zeros.


RMatrix3d

public RMatrix3d(double[] matrix)
Constructs and initializes a RMatrix3d from the specified nine element array. this.m00=matrix[0], this.m01=matrix[1], ... , this.m10=matrix[3], etc.

Parameters:
matrix - the array of length 9 containing in order.
Method Detail

S

public void S(RVector3d w)
Gets S matrix. If R(t) is a rotation matrix the derivate prime R(t)'= S(w(t))*R(t), w(t) angular velocity..

Parameters:
w - input vector

getQuaternion

public Quaternion getQuaternion()
Get the quaternion from this matrix.

Returns:
the quaternion

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.Matrix3d
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)