|
Jeospace API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.jeospace.coordinate.Quaternion
A normalized quaternion implemented with double precision floating point values.
Attitude,
AxisAngle,
Vector| Constructor Summary | |
Quaternion()
Construct an identity quaternion - initialized to (0.0, 0.0, 0.0, 1.0) |
|
Quaternion(Attitude attitude)
Construct a quaternion that cooresponds to the argument Attitude. |
|
Quaternion(AxisAngle a)
Construct a quaternion initialized to the given value and normalized |
|
Quaternion(double[] quat)
Construct a quaternion initialized to the given value and normalized |
|
Quaternion(double x,
double y,
double z,
double w)
Construct a quaternion initialized to the given value and normalized |
|
Quaternion(Quaternion quat)
Construct a quaternion initialized to duplicate the argument |
|
Quaternion(Vector axis,
double angle)
Construct a quaternion initialized to the given value and normalized |
|
| Method Summary | |
double |
angle(Quaternion quat)
Return the angular separation of this quaternion and the argument in units of radians. |
java.lang.Object |
clone()
Return a clone of the quaternion |
void |
conjugate()
Set the value of this quaternion to it's conjugate (or inverse) |
double |
dot(Quaternion quat)
Return the value of the dot product of this quaternion and the argument |
boolean |
equals(java.lang.Object obj)
Check the quaternion for equality with the passed object. |
void |
get(Attitude a)
Initialize the argument Attitude object to correspond to the quaternion
oriented per the DefaultConvention. |
void |
get(AxisAngle a)
Return the value of the quaternion as an axis angle |
void |
get(double[] quat)
Return the value of the quaternion |
void |
get(Quaternion quat)
Return the value of the quaternion |
double |
get(Vector axis)
Return the value of the quaternion |
Attitude |
getAttitude()
Return an Attitude object that corresponds to the quaternion
oriented per the DefaultConvention. |
AxisAngle |
getAxisAngle()
Return an AxisAngle object that corresponds to the quaternion |
int |
hashCode()
Calculate the hash code |
double |
magnitude()
Return the magnitude of the quaternion |
void |
mult(Quaternion quat)
Set the value of this quaternion multiplied by the argument |
void |
set(Attitude attitude)
Set the value of the quaternion to coorespond to the argument Attitude. |
void |
set(AxisAngle a)
Set the value of the quaternion initialized to the given value and normalize |
void |
set(double[] quat)
Set the value of the quaternion and normalize |
void |
set(double x,
double y,
double z,
double w)
Set the value of the quaternion and normalize |
void |
set(Quaternion quat)
Set the value of the quaternion to duplicate the argument |
void |
set(Vector axis,
double angle)
Set the value of the quaternion and normalize |
java.lang.String |
toString()
Return a string representing the quaternion of the form "x, y, z, w" |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public Quaternion()
public Quaternion(double x,
double y,
double z,
double w)
x - the x valuey - the y valuez - the z valuew - the w valuepublic Quaternion(double[] quat)
quat - the double array of valuespublic Quaternion(Quaternion quat)
quat - the Quaternion object to duplicate
public Quaternion(Vector axis,
double angle)
axis - the Vector axis of rotationangle - the rotation in radians about the axispublic Quaternion(AxisAngle a)
a - the AxisAngle representation of the rotationpublic Quaternion(Attitude attitude)
Attitude.
Note: the conversion is specific to the DefaultConvention.
The orientation axis' are:
yaw - about the Y axis
pitch - about the X axis
roll - about the Z axis
attitude - the Attitude object to convert| Method Detail |
public void set(Vector axis,
double angle)
axis - the Vector axis of rotationangle - the rotation in radians about the axispublic double get(Vector axis)
axis - the Vector object to initialize with the
axis of rotation
public void set(AxisAngle a)
a - the AxisAngle representation of the rotationpublic void get(AxisAngle a)
a - the AxisAngle to initializepublic AxisAngle getAxisAngle()
AxisAngle object that corresponds to the quaternion
AxisAngle object that corresponds to the quaternionpublic void set(Attitude attitude)
Attitude.
Note: the conversion is specific to the DefaultConvention.
The orientation axis' are:
yaw - about the Y axis
pitch - about the X axis
roll - about the Z axis
attitude - the Attitude object to convertpublic void get(Attitude a)
Attitude object to correspond to the quaternion
oriented per the DefaultConvention.
a - the Attitude object to initialize from the quaternionpublic Attitude getAttitude()
Attitude object that corresponds to the quaternion
oriented per the DefaultConvention.
Attitude object that corresponds to the quaternion
public void set(double x,
double y,
double z,
double w)
x - the x valuey - the y valuez - the z valuew - the w valuepublic void set(double[] quat)
quat - the double array of valuespublic void get(double[] quat)
quat - the double array to initializepublic void set(Quaternion quat)
quat - the Quaternion object to duplicatepublic void get(Quaternion quat)
quat - the Quaternion object to initializepublic void mult(Quaternion quat)
quat - the multiplierpublic double dot(Quaternion quat)
quat - the argument quaternion
public double angle(Quaternion quat)
Math.PI.
quat - the argument quaternion
public void conjugate()
public double magnitude()
public java.lang.Object clone()
Quaternion objectpublic int hashCode()
public boolean equals(java.lang.Object obj)
true if the values of the quaternion are identical,
false otherwisepublic java.lang.String toString()
|
Jeospace API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||