|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.kuka.math.geometry.MathUtils
public final class MathUtils
Utility class providing static helper methods for the mathematical classes.
Vector3D,
Matrix| Method Summary | |
|---|---|
static IRotation |
defensiveCopy(IRotation orig)
Returns an immutable AbstractRotation instance of the given
rotation. |
static ITransformation |
defensiveCopy(ITransformation orig)
Returns an immutable AbstractTransformation instance of the given
transformation. |
static boolean |
elementEqual(IRotation a,
IRotation b,
double epsilon)
Checks if two Rotations are approximately equal by checking the matrix representations for element-wise approximate equality. |
static boolean |
elementEqual(ITransformation a,
ITransformation b,
double epsilon)
Checks if two transformations are approximately equal. |
static boolean |
elementEqual(Matrix a,
Matrix b,
double epsilon)
Checks if the two matrices are element wise nearly equal. |
static boolean |
elementEqual(Point3D a,
Point3D b,
double epsilon)
Checks if the two points are element wise nearly equal. |
static boolean |
elementEqual(Vector3D a,
Vector3D b,
double epsilon)
Checks if the two vectors are element wise nearly equal. |
static boolean |
equal(double value1,
double value2,
double epsilon)
Checks if the two double values are nearly equal. |
static Vector3D |
getAxisVector(CoordinateAxis axis)
Returns an unit vector representing the specified CoordinateAxis. |
static NumberFormat |
getDefaultNumberFormat()
Returns an instance of the default NumberFormat. |
static Vector3D |
getDirectionVector(CoordinateDirection direction)
Returns an unit vector representing the specified CoordinateDirection. |
static Vector3D |
getNormalVector(CoordinatePlane plane)
Returns the normal vector corresponding to the specified CoordinatePlane. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static boolean equal(double value1,
double value2,
double epsilon)
value1 - The first value.value2 - The second value.epsilon - the maximum tolerated difference between the values
|value1 - value2| < epsilon.
public static boolean elementEqual(Vector3D a,
Vector3D b,
double epsilon)
result = false;
For index = 0 to 2 do
result &&= |vector1(index) - vector2(index)| < epsilon
endFor
a - The first vector.b - The second vector.epsilon - the maximum tolerated difference between the respective
elements
false.Vector3D.equals(Object)
public static boolean elementEqual(Matrix a,
Matrix b,
double epsilon)
result = false;
For row = 0 to 2 do
For column = 0 to 2 do
result &&= |matrix1(row,column) - matrix2(row,column)| < epsilon
endFor - column
endFor - row
a - The first matrix.b - The second matrix.epsilon - the maximum tolerated difference between the respective
elements
false.Matrix.equals(Object)
public static boolean elementEqual(Point3D a,
Point3D b,
double epsilon)
elementEqual(Vector3D, Vector3D, double)
a - The first point.b - The second point.epsilon - the maximum tolerated difference between the respective
elements
false.Point3D.equals(Object)
public static boolean elementEqual(IRotation a,
IRotation b,
double epsilon)
elementEqual(Matrix, Matrix, double)
a - The first rotation.b - The second rotation.epsilon - the maximum tolerated difference between the respective matrix
elements
false.
public static boolean elementEqual(ITransformation a,
ITransformation b,
double epsilon)
elementEqual(Matrix, Matrix, double) and
elementEqual(Vector3D, Vector3D, double) ). A small epsilon
check is performed.
a - The first transformation.b - The second transformation.epsilon - the maximum tolerated difference between the respective matrix
elements
false.public static NumberFormat getDefaultNumberFormat()
NumberFormat. The returned formatting is independent from your
Locale settings.
NumberFormatpublic static IRotation defensiveCopy(IRotation orig)
AbstractRotation instance of the given
rotation. If the given rotation is already of a known immutable type then
it is returned unchanged.
orig - The rotation whose value should be taken over.
AbstractRotation instance
IllegalArgumentException - if orig is nullpublic static ITransformation defensiveCopy(ITransformation orig)
AbstractTransformation instance of the given
transformation. If the given transformation is already of a known
immutable type then it is returned unchanged.
orig - The transformation whose value should be taken over.
AbstractTransformation instance
IllegalArgumentException - if orig is nullpublic static Vector3D getAxisVector(CoordinateAxis axis)
CoordinateAxis.
axis - the axis of a Cartesian coordinate system
Vector3D of the specified axispublic static Vector3D getDirectionVector(CoordinateDirection direction)
CoordinateDirection.
direction - the direction along the axis of a Cartesian coordinate system
Vector3D in the specified axis directionpublic static Vector3D getNormalVector(CoordinatePlane plane)
CoordinatePlane.
plane - the plane of a Cartesian coordinate system
Vector3D that is perpendicular to the specified plane
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||