javax.robotics.vecmath
Class RVector4d

java.lang.Object
  extended by javax.vecmath.Tuple4d
      extended by javax.vecmath.Vector4d
          extended by javax.robotics.vecmath.RVector4d
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class RVector4d
extends javax.vecmath.Vector4d

A 4-element vector represented by double-precision floating point x,y,z,w coordinates. This class extend printing functionality of Vector4d class.

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

Field Summary
 
Fields inherited from class javax.vecmath.Tuple4d
w, x, y, z
 
Constructor Summary
RVector4d()
          Constructs and initializes a RVector4d to (0,0,0,0).
RVector4d(double[] vector)
          Constructs and initializes a RVector4d from the coordinates contained in the array.
RVector4d(double x, double y, double z, double w)
          Constructs and initializes a RVector4d from the specified xyzw coordinates.
RVector4d(RVector4d vector)
          Constructs and initializes a RVector4d from the specified RVector4d.
RVector4d(javax.vecmath.Vector4d vector)
          Constructs and initializes a RVector4d from the specified Vector4d.
 
Method Summary
 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.Vector4d
angle, dot, length, lengthSquared, normalize, normalize, set
 
Methods inherited from class javax.vecmath.Tuple4d
absolute, absolute, add, add, clamp, clamp, clamp, clamp, clampMax, clampMax, clampMax, clampMax, clampMin, clampMin, clampMin, clampMin, clone, epsilonEquals, equals, equals, get, get, hashCode, interpolate, interpolate, interpolate, interpolate, negate, negate, scale, scale, scaleAdd, scaleAdd, scaleAdd, set, set, set, set, sub, sub
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RVector4d

public RVector4d()
Constructs and initializes a RVector4d to (0,0,0,0).


RVector4d

public RVector4d(RVector4d vector)
Constructs and initializes a RVector4d from the specified RVector4d.

Parameters:
vector - the RVector4d containing the initialization x y z w data

RVector4d

public RVector4d(javax.vecmath.Vector4d vector)
Constructs and initializes a RVector4d from the specified Vector4d.

Parameters:
vector - the Vector4d containing the initialization x y z w data

RVector4d

public RVector4d(double[] vector)
Constructs and initializes a RVector4d from the coordinates contained in the array.

Parameters:
vector - the array of length 4 containing x y z w in order

RVector4d

public RVector4d(double x,
                 double y,
                 double z,
                 double w)
Constructs and initializes a RVector4d from the specified xyzw coordinates.

Parameters:
x - the x coordinate
y - the y coordinate
z - the z coordinate
w - the w coordinate
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.Tuple4d
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)