|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.kuka.math.geometry.AbstractRotation
com.kuka.math.geometry.EulerZyxRotation
public final class EulerZyxRotation
Immutable representation of a spatial rotation as Z-Y-X Euler angles, which are the same as X-Y-Z fixed angles.
Note: The angles α (alpha), β (beta), γ (gamma) are the same as the angles A, B, C in KUKA notation, respectively.
Note: The designations are the same as those used by J. J. Craig in "Introduction to Robotics".
| Field Summary | |
|---|---|
static EulerZyxRotation |
NONE
Immutable EulerZyxRotation instance representing no rotation. |
| Method Summary | |
|---|---|
boolean |
equals(Object obj)
|
double |
getAlphaRad()
Returns the α (alpha) angle of the rotation in [rad]. |
double |
getBetaRad()
Returns the β (beta) angle of the rotation in [rad]. |
double |
getGammaRad()
Returns the γ (gamma) angle of the rotation in [rad]. |
Matrix |
getMatrix()
Returns a matrix representing this rotation. |
int |
hashCode()
|
static EulerZyxRotation |
of(IRotation orig)
Returns an immutable instance from the values of the provided rotation. |
static EulerZyxRotation |
ofDeg(double alpha,
double beta,
double gamma)
Returns an immutable EulerZyxRotation instance with the given angle values. |
static EulerZyxRotation |
ofRad(double alpha,
double beta,
double gamma)
Returns an immutable EulerZyxRotation instance with the given angle values. |
String |
toString()
Returns a textual description of the rotation. |
String |
toString(NumberFormat fmt)
Returns a textual description of the rotation. |
EulerZyxRotation |
withAlphaRad(double value)
Returns a new instance (copy) of the rotation, with the α (alpha) angle replaced by the new value. |
EulerZyxRotation |
withBetaRad(double value)
Returns a new instance (copy) of the rotation, with the β (beta) angle replaced by the new value. |
EulerZyxRotation |
withGammaRad(double value)
Returns a new instance (copy) of the rotation, with the γ (gamma) angle replaced by the new value. |
| Methods inherited from class com.kuka.math.geometry.AbstractRotation |
|---|
applyTo, applyTo, compose, invert, rotationalDistanceTo, rotationTo |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final EulerZyxRotation NONE
EulerZyxRotation instance representing no rotation.
| Method Detail |
|---|
public static EulerZyxRotation ofRad(double alpha,
double beta,
double gamma)
EulerZyxRotation instance with the given angle values.
alpha - the α (alpha) angle of the rotation in [rad]. Note: This is the same as the angle A in KUKA
notation.beta - the β (beta) angle of the rotation in [rad]. Note: This is the same as the angle B in KUKA
notation.gamma - the γ (gamma) angle of the rotation in [rad]. Note: This is the same as the angle C in KUKA
notation.
EulerZyxRotation instance
public static EulerZyxRotation ofDeg(double alpha,
double beta,
double gamma)
EulerZyxRotation instance with the given angle values.
alpha - the α (alpha) angle of the rotation in degrees. Note: This is the same as the angle A in KUKA
notation.beta - the β (beta) angle of the rotation in degrees. Note: This is the same as the angle B in KUKA
notation.gamma - the γ (gamma) angle of the rotation in degrees. Note: This is the same as the angle C in KUKA
notation.
EulerZyxRotation instancepublic static EulerZyxRotation of(IRotation orig)
orig - the instance from which to take over the rotation
public double getAlphaRad()
Note: This is the same as the angle A in KUKA notation.
public double getBetaRad()
Note: This is the same as the angle B in KUKA notation.
public double getGammaRad()
Note: This is the same as the angle C in KUKA notation.
public Matrix getMatrix()
IRotation
getMatrix in interface IRotationgetMatrix in class AbstractRotationMatrix representing this rotation. This is potentially
a costly conversionpublic EulerZyxRotation withAlphaRad(double value)
value - the α (alpha) angle of the rotation in [rad]. Note: This is the same as the angle A in KUKA
notation.
public EulerZyxRotation withBetaRad(double value)
value - the β (beta) angle of the rotation in [rad]. Note: This is the same as the angle B in KUKA
notation.
public EulerZyxRotation withGammaRad(double value)
value - the γ (gamma) angle of the rotation in [rad]. Note: This is the same as the angle C in KUKA
notation.
public int hashCode()
hashCode in class Objectpublic boolean equals(Object obj)
equals in class Objectpublic String toString()
This implementation will print all angle values in rad. The numerical values will be printed with the default
format as returned by MathUtils.getDefaultNumberFormat(). The following string can be regarded as
typical:
[A=0.0 B=3.14159 C=0.0]
toString in class AbstractRotationpublic String toString(NumberFormat fmt)
This implementation will print all angle values in rad. The numerical values will be printed using the
NumberFormat.format(double) method of the given formatter.
Example: The following code snippet, used on a given EulerZyxRotation rot
NumberFormat fmt = NumberFormat.getNumberInstance(Locale.US); fmt.setMinimumFractionDigits(1); fmt.setMaximumFractionDigits(3); System.out.println(rot.toString(fmt));might give the following output:
[A=1.235 B=3.142 C=0.0]
fmt - the NumberFormat used to format the number values
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||