|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.vecmath.Tuple4d javax.vecmath.Quat4d javax.robotics.vecmath.Quaternion
public class Quaternion
A 4-element quaternion represented by double precision floating point x,y,z,w coordinates. The quaternion is always normalized. This class extends printing functionality of Quat4d class
Field Summary |
---|
Fields inherited from class javax.vecmath.Tuple4d |
---|
w, x, y, z |
Constructor Summary | |
---|---|
Quaternion()
Constructs and initializes a Quaternion to (0,0,0,0). |
|
Quaternion(double[] q)
Constructs and initializes a Quaternion from the array of length 4. |
|
Quaternion(double x,
double y,
double z,
double w)
Constructs and initializes a Quaternion from the specified xyzw coordinates. |
|
Quaternion(javax.vecmath.Quat4d q)
Constructs and initializes a Quaternion from the specified Quat4d. |
|
Quaternion(Quaternion q)
Constructs and initializes a new Quaternion from the specified Quaternion. |
Method Summary | |
---|---|
double |
dot(Quaternion q)
|
double |
getScalar()
Gets the scalar component of Quaternion. |
RVector3d |
getVector()
Gets the vectorial component of Quaternion |
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.Quat4d |
---|
conjugate, conjugate, interpolate, interpolate, inverse, inverse, mul, mul, mulInverse, mulInverse, normalize, normalize, set, set, set, set, set, 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 |
---|
public Quaternion()
public Quaternion(double[] q)
q
- the array of length 4 containing xyzw in orderpublic Quaternion(double x, double y, double z, double w)
x
- the x coordinatey
- the y coordinatez
- the z coordinatew
- the w scalar componentpublic Quaternion(javax.vecmath.Quat4d q)
q
- the Quat4d containing the initialization x y z w datapublic Quaternion(Quaternion q)
q
- the Quaternion containing the initialization x y z w data.Method Detail |
---|
public RVector3d getVector()
public final double getScalar()
public double dot(Quaternion q)
public void printf()
public void printf(java.lang.String format)
The format specifiers for numeric types have the following syntax:
%[width][.precision]conversion
width
is a non-negative decimal
integer indicating the minimum number of characters to be written to the
output. precision
is a non-negative
decimal integer usually used to restrict the number of characters. The
specific behavior depends on the conversion. conversion
is a character
indicating how the argument should be formatted. The set of valid
conversions for a given argument depends on the argument's data type.
Example: v.printf("%5.3f");
format
- The format stringPrintStream.format(java.lang.String, java.lang.Object[])
public void printf(java.io.PrintStream out)
PrintStream
out
- The PrintStream
object.public void printf(java.io.PrintStream out, java.lang.String format)
PrintStream
according to the format string
out
- The PrintStream
object.format
- The format string.printf(String)
public java.lang.String toString()
toString
in class javax.vecmath.Tuple4d
public java.lang.String toString(java.lang.String format)
format
- The format string
printf(String)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |