|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.kuka.math.geometry.AbstractTransformation
com.kuka.math.geometry.XyzAbcTransformation
public final class XyzAbcTransformation
Immutable representation of a spatial transformation as a combination of x, y, z translational elements and α, β, γ (resp. A, B, C) rotational elements.
The Robotics API always assumes the translation part to be given in [mm].
| Field Summary | |
|---|---|
static XyzAbcTransformation |
IDENTITY
Immutable XyzAbcTransformation instance representing identity (i.e. unchanging) transformation. |
| Method Summary | |
|---|---|
boolean |
equals(Object obj)
|
double |
getAlphaRad()
Returns the α (alpha) angle of the rotation part of the transformation in radians. |
double |
getBetaRad()
Returns the β (beta) angle of the rotation part of the transformation in radians. |
double |
getGammaRad()
Returns the γ (gamma) angle of the rotation part of the transformation in radians. |
EulerZyxRotation |
getRotation()
Returns the rotation corresponding to this transformation. |
Vector3D |
getTranslation()
Returns the translation part of the transformation, i.e. the upper-right 3x1 part of the corresponding homogeneous transformation matrix. |
double |
getX()
Returns the x element of the translation part of the transformation. |
double |
getY()
Returns the y element of the translation part of the transformation. |
double |
getZ()
Returns the z element of the translation part of the transformation. |
int |
hashCode()
|
static XyzAbcTransformation |
of(double x,
double y,
double z)
Returns an immutable XyzAbcTransformation instance, consisting of a translational part and no rotation. |
static XyzAbcTransformation |
of(ITransformation orig)
Returns an immutable XyzAbcTransformation instance with the same value as the given transformation. |
static XyzAbcTransformation |
of(Vector3D translation)
Returns an immutable XyzAbcTransformation instance, consisting of a translational part and no rotation. |
static XyzAbcTransformation |
of(Vector3D translation,
IRotation rotation)
Returns an immutable XyzAbcTransformation instance, consisting of a rotational and a translational part. |
static XyzAbcTransformation |
ofDeg(double x,
double y,
double z,
double alpha,
double beta,
double gamma)
Returns an immutable XyzAbcTransformation instance, consisting of a translational and a rotational part. |
static XyzAbcTransformation |
ofRad(double x,
double y,
double z,
double alpha,
double beta,
double gamma)
Returns an immutable XyzAbcTransformation instance, consisting of a translational and a rotational part. |
String |
toString()
Returns a textual description of the transformation. |
String |
toString(NumberFormat fmt)
Returns a textual description of the transformation. |
XyzAbcTransformation |
withAlphaRad(double value)
Returns a new instance (copy) of the transformation, with the α (alpha) angle replaced by the new value. |
XyzAbcTransformation |
withBetaRad(double value)
Returns a new instance (copy) of the transformation, with the β (beta) angle replaced by the new value. |
XyzAbcTransformation |
withGammaRad(double value)
Returns a new instance (copy) of the transformation, with the γ (gamma) angle replaced by the new value. |
XyzAbcTransformation |
withRotation(EulerZyxRotation rotation)
Returns a new instance (copy) of the transformation, with the rotational part replaced by the given rotation. |
XyzAbcTransformation |
withTranslation(Vector3D translation)
Returns a new instance (copy) of the transformation, with the translational part replaced by the given translation. |
XyzAbcTransformation |
withX(double value)
Returns a new instance (copy) of this transformation where the x element of the translation part of the
is replaced by the given value. |
XyzAbcTransformation |
withY(double value)
Returns a new instance (copy) of this transformation where the y element of the translation part of the
is replaced by the given value. |
XyzAbcTransformation |
withZ(double value)
Returns a new instance (copy) of this transformation where the z element of the translation part of the
is replaced by the given value. |
| Methods inherited from class com.kuka.math.geometry.AbstractTransformation |
|---|
applyTo, applyTo, compose, distanceTo, invert, rotationalDistanceTo, transformationTo, withRotation |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final XyzAbcTransformation IDENTITY
XyzAbcTransformation instance representing identity (i.e. unchanging) transformation.
| Method Detail |
|---|
public static XyzAbcTransformation ofDeg(double x,
double y,
double z,
double alpha,
double beta,
double gamma)
XyzAbcTransformation instance, consisting of a translational and a rotational part.
The translation is given by the three cartesian vector elements x, y, z. The rotation is given by the three Euler
Z-Y-X angles α, β, γ in degree.
x - x element of translationy - y element of translationz - z element of translationalpha - 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.
XyzAbcTransformation instance
public static XyzAbcTransformation ofRad(double x,
double y,
double z,
double alpha,
double beta,
double gamma)
XyzAbcTransformation instance, consisting of a translational and a rotational part.
The translation is given by the three cartesian vector elements x, y, z. The rotation is given by the three Euler
Z-Y-X angles α, β, γ in radians.
x - x element of translationy - y element of translationz - z element of translationalpha - the α (alpha) angle of the rotation in radians. Note: This is the same as the angle A in KUKA
notation.beta - the β (beta) angle of the rotation in radians. Note: This is the same as the angle B in KUKA
notation.gamma - the γ (gamma) angle of the rotation in radians. Note: This is the same as the angle C in KUKA
notation.
XyzAbcTransformation instance
public static XyzAbcTransformation of(double x,
double y,
double z)
XyzAbcTransformation instance, consisting of a translational part and no rotation.
The translation is given by the three cartesian vector elements x, y, z.
x - x element of translationy - y element of translationz - z element of translation
XyzAbcTransformation instance
public static XyzAbcTransformation of(Vector3D translation,
IRotation rotation)
XyzAbcTransformation instance, consisting of a rotational and a translational part.
translation - the translational part of the transformation.rotation - the rotational part of the transformation.
XyzAbcTransformation instance
IllegalArgumentException - if rotation or translation is nullpublic static XyzAbcTransformation of(Vector3D translation)
XyzAbcTransformation instance, consisting of a translational part and no rotation.
translation - the translational part of the transformation.
XyzAbcTransformation instance
IllegalArgumentException - if translation is nullpublic static XyzAbcTransformation of(ITransformation orig)
XyzAbcTransformation instance with the same value as the given transformation. If
the given transformation is already of a known immutable type then it is returned unchanged.
orig - an object describing the transformation
XyzAbcTransformation instance
IllegalArgumentException - if orig is nullpublic double getX()
x element of the translation part of the transformation.
x element of the translation part of the transformationpublic double getY()
y element of the translation part of the transformation.
y element of the translation part of the transformationpublic double getZ()
z element of the translation part of the transformation.
z element of the translation part of the transformationpublic 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 EulerZyxRotation getRotation()
ITransformation
getRotation in interface ITransformationgetRotation in class AbstractTransformationpublic Vector3D getTranslation()
ITransformation
getTranslation in interface ITransformationgetTranslation in class AbstractTransformationpublic XyzAbcTransformation withX(double value)
x element of the translation part of the
is replaced by the given value.
value - the x element of the translation part of the transformation
public XyzAbcTransformation withY(double value)
y element of the translation part of the
is replaced by the given value.
value - the y element of the translation part of the transformation
public XyzAbcTransformation withZ(double value)
z element of the translation part of the
is replaced by the given value.
value - the z element of the translation part of the transformation
public XyzAbcTransformation withAlphaRad(double value)
value - the α (alpha) angle of the transformation in radians. Note: This is the same as the angle A in
KUKA notation.
public XyzAbcTransformation withBetaRad(double value)
value - the β (beta) angle of the transformation in radians. Note: This is the same as the angle B in
KUKA notation.
public XyzAbcTransformation withGammaRad(double value)
value - the γ (gamma) angle of the transformation in radians. Note: This is the same as the angle C in
KUKA notation.
public XyzAbcTransformation withRotation(EulerZyxRotation rotation)
rotation - the rotational part of the transformation in Euler-Z-Y-X representation.
XyzAbcTransformation instancepublic XyzAbcTransformation withTranslation(Vector3D translation)
AbstractTransformation
withTranslation in class AbstractTransformationtranslation - the translational part of the transformation (the upper-right
3x1 part of a homogeneous transformation matrix).
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:
[X=10.0 Y=-20.5 Z=3.0 A=0.0 B=1.5708 C=0.0]
toString in class AbstractTransformationpublic 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 XyzAbcTransformation trafo
NumberFormat fmt = NumberFormat.getNumberInstance(Locale.US); fmt.setMinimumFractionDigits(1); fmt.setMaximumFractionDigits(3); System.out.println(trafo.toString(fmt));might give the following output:
[X=100.0 Y=-1.235 Z=3.0 A=-1.047 B=1.571 C=0.785]
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 | |||||||||