Package org.robwork.sdurw_math
Class Transform3Df
- java.lang.Object
-
- org.robwork.sdurw_math.Transform3Df
-
public class Transform3Df extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description Transform3Df()
Default Constructor.
Initializes with 0 translation and Identity matrix as rotationTransform3Df(long cPtr, boolean cMemoryOwn)
Transform3Df(Rotation3Df R)
A homogeneous transform with a rotation of R and a
translation of zero.Transform3Df(Transform3Df t)
Copy ConstructorTransform3Df(Vector3Df d)
A homogeneous transform with a rotation of zero and a
translation of d.Transform3Df(Vector3Df d, Rotation3Df R)
Constructs a homogeneous transformTransform3Df(Vector3Df d, Rotation3DVectorf r)
Constructs a homogeneous transform
Calling this constructor is equivalent to the transform
Transform3D(d, r.toRotation3D()).
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Transform3Df
craigDH(float alpha, float a, float d, float theta)
void
delete()
static Transform3Df
DH(float alpha, float a, float d, float theta)
static Transform3Df
DHHGP(float alpha, float a, float beta, float b)
EigenMatrix4f
e()
Returns a Eigen 4x4 matrix \mathbf{M}\in SE(3) that represents this homogeneous transformation
boolean
equal(Transform3Df t3d)
Compares the transformations with a given precision
Performs an element wise comparison.boolean
equal(Transform3Df t3d, float precision)
Compares the transformations with a given precision
Performs an element wise comparison.boolean
equals(Transform3Df rhs)
Comparison operator.
The comparison operator makes a element wise comparison.
Returns true only if all elements are equal.
float
get(long row, long column)
static long
getCPtr(Transform3Df obj)
static Transform3Df
identity()
static Transform3Df
invMult(Transform3Df t1, Transform3Df t2)
computes the inverse of t1 and multiplies it with t2.
The result is saved in t1.static Transform3Df
invMult(Transform3Df t1, Transform3Df t2, Transform3Df t3)
computes the inverse of t1 and multiplies it with t2.
The result is saved in t1.static Transform3Df
makeLookAt(Vector3Df eye, Vector3Df center, Vector3Df up)
creates a transformation that is positioned in eye and looking toward
center along -z where up indicates the upward direction along which the y-axis
is placed.Transform3Df
multiply(Transform3Df bTc)
static void
multiply(Transform3Df a, Transform3Df b, Transform3Df result)
Write to result the product a * b.Vector3Df
multiply(Vector3Df bP)
Calculates \robax{a}{\mathbf{p}} = \robabx{a}{b}{\mathbf{T}} \robax{b}{\mathbf{p}} thus transforming point \mathbf{p} from frame b
to frame aVelocityScrew6Df
multiply(VelocityScrew6Df rhs)
Wrench6Df
multiply(Wrench6Df rhs)
boolean
notEqual(Transform3Df rhs)
Comparison operator.
The comparison operator makes a element wise comparison.
Returns true if any of the elements are different.
Vector3Df
P()
Gets the position part \mathbf{d} from \mathbf{T}Rotation3Df
R()
Gets the rotation part \mathbf{R} from \mathbf{T}void
set(long row, long column, float d)
java.lang.String
toString()
-
-
-
Constructor Detail
-
Transform3Df
public Transform3Df(long cPtr, boolean cMemoryOwn)
-
Transform3Df
public Transform3Df()
Default Constructor.
Initializes with 0 translation and Identity matrix as rotation
-
Transform3Df
public Transform3Df(Vector3Df d, Rotation3Df R)
Constructs a homogeneous transform- Parameters:
d
- [in] \mathbf{d} A 3x1 translation vectorR
- [in] \mathbf{R} A 3x3 rotation matrix
-
Transform3Df
public Transform3Df(Rotation3Df R)
A homogeneous transform with a rotation of R and a
translation of zero.
-
Transform3Df
public Transform3Df(Vector3Df d)
A homogeneous transform with a rotation of zero and a
translation of d.
-
Transform3Df
public Transform3Df(Transform3Df t)
Copy Constructor- Parameters:
t
- [in] Values to initialize the transform
-
Transform3Df
public Transform3Df(Vector3Df d, Rotation3DVectorf r)
Constructs a homogeneous transform
Calling this constructor is equivalent to the transform
Transform3D(d, r.toRotation3D()).
- Parameters:
d
- [in] \mathbf{d} A 3x1 translation vectorr
- [in] \mathbf{r} A 3x1 rotation vector
-
-
Method Detail
-
getCPtr
public static long getCPtr(Transform3Df obj)
-
delete
public void delete()
-
DH
public static Transform3Df DH(float alpha, float a, float d, float theta)
-
craigDH
public static Transform3Df craigDH(float alpha, float a, float d, float theta)
-
DHHGP
public static Transform3Df DHHGP(float alpha, float a, float beta, float b)
-
identity
public static Transform3Df identity()
-
get
public float get(long row, long column)
-
set
public void set(long row, long column, float d)
-
equals
public boolean equals(Transform3Df rhs)
Comparison operator.
The comparison operator makes a element wise comparison.
Returns true only if all elements are equal.
- Parameters:
rhs
- [in] Transform to compare with- Returns:
- True if equal.
-
notEqual
public boolean notEqual(Transform3Df rhs)
Comparison operator.
The comparison operator makes a element wise comparison.
Returns true if any of the elements are different.
- Parameters:
rhs
- [in] Transform to compare with- Returns:
- True if not equal.
-
equal
public boolean equal(Transform3Df t3d, float precision)
Compares the transformations with a given precision
Performs an element wise comparison. Two elements are considered equal if the difference
are less than precision.
- Parameters:
t3d
- [in] Transform to compare withprecision
- [in] The precision to use for testing- Returns:
- True if all elements are less than precision apart.
-
equal
public boolean equal(Transform3Df t3d)
Compares the transformations with a given precision
Performs an element wise comparison. Two elements are considered equal if the difference
are less than precision.
- Parameters:
t3d
- [in] Transform to compare with
- Returns:
- True if all elements are less than precision apart.
-
multiply
public Transform3Df multiply(Transform3Df bTc)
-
multiply
public Vector3Df multiply(Vector3Df bP)
Calculates \robax{a}{\mathbf{p}} = \robabx{a}{b}{\mathbf{T}} \robax{b}{\mathbf{p}} thus transforming point \mathbf{p} from frame b
to frame a- Parameters:
bP
- [in] \robax{b}{\mathbf{p}}- Returns:
- \robax{a}{\mathbf{p}}
-
R
public Rotation3Df R()
Gets the rotation part \mathbf{R} from \mathbf{T}- Returns:
- \mathbf{R}
-
P
public Vector3Df P()
Gets the position part \mathbf{d} from \mathbf{T}- Returns:
- \mathbf{d}
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
multiply
public static void multiply(Transform3Df a, Transform3Df b, Transform3Df result)
Write to result the product a * b.
-
invMult
public static Transform3Df invMult(Transform3Df t1, Transform3Df t2)
computes the inverse of t1 and multiplies it with t2.
The result is saved in t1. t1 = inv(t1) * t2
-
invMult
public static Transform3Df invMult(Transform3Df t1, Transform3Df t2, Transform3Df t3)
computes the inverse of t1 and multiplies it with t2.
The result is saved in t1. t1 = inv(t1) * t2
-
makeLookAt
public static Transform3Df makeLookAt(Vector3Df eye, Vector3Df center, Vector3Df up)
creates a transformation that is positioned in eye and looking toward
center along -z where up indicates the upward direction along which the y-axis
is placed. Same convention as for gluLookAt
and is handy for placing a cameraview.- Parameters:
eye
- [in] position of viewcenter
- [in] point to look towardup
- [in] the upward direction (the- Returns:
- Transformation
-
e
public EigenMatrix4f e()
Returns a Eigen 4x4 matrix \mathbf{M}\in SE(3) that represents this homogeneous transformation
- Returns:
- \mathbf{M}\in SE(3)
-
multiply
public VelocityScrew6Df multiply(VelocityScrew6Df rhs)
-
-