Package org.robwork.sdurw
Class Transform3f
- java.lang.Object
-
- org.robwork.sdurw.Transform3f
-
public class Transform3f extends java.lang.Object
A 4x4 homogeneous transform matrix.
-
-
Constructor Summary
Constructors Constructor Description Transform3f()
Default Constructor.
Initializes with 0 translation and Identity matrix as rotationTransform3f(long cPtr, boolean cMemoryOwn)
Transform3f(Transform3f t3d)
Transform3f(Vector3f d, Rotation3DVectorf r)
Constructs a homogeneous transform
Calling this constructor is equivalent to the transform
Transform3D(d, r.toRotation3D()).
Transform3f(Vector3f position, Rotation3f rotation)
Constructs a homogeneous transform
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Transform3f
craigDH(float alpha, float a, float d, float theta)
Constructs a homogeneous transform using the Craig (modified)
Denavit-Hartenberg notation
void
delete()
static Transform3f
DH(float alpha, float a, float d, float theta)
Constructs a homogeneous transform using the original
Denavit-Hartenberg notation
static long
getCPtr(Transform3f obj)
static Transform3f
identity()
Constructs the identity transform
static Transform3f
makeLookAt(Vector3f eye, Vector3f center, Vector3f 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.Transform3f
multiply(Transform3f other)
Vector3f
multiply(Vector3f other)
Vector3f
P()
Gets the position part P from T
Rotation3f
R()
Gets the rotation part R from T.
java.lang.String
toString()
-
-
-
Constructor Detail
-
Transform3f
public Transform3f(long cPtr, boolean cMemoryOwn)
-
Transform3f
public Transform3f()
Default Constructor.
Initializes with 0 translation and Identity matrix as rotation
-
Transform3f
public Transform3f(Transform3f t3d)
-
Transform3f
public Transform3f(Vector3f position, Rotation3f rotation)
Constructs a homogeneous transform
-
Transform3f
public Transform3f(Vector3f d, Rotation3DVectorf r)
Constructs a homogeneous transform
Calling this constructor is equivalent to the transform
Transform3D(d, r.toRotation3D()).
- Parameters:
d
- [in] A 3x1 translation vectorr
- [in] A 3x1 rotation vector
-
-
Method Detail
-
getCPtr
public static long getCPtr(Transform3f obj)
-
delete
public void delete()
-
multiply
public Transform3f multiply(Transform3f other)
-
DH
public static Transform3f DH(float alpha, float a, float d, float theta)
Constructs a homogeneous transform using the original
Denavit-Hartenberg notation
- Parameters:
alpha
- [in]a
- [in]d
- [in]theta
- [in]
- Returns:
- transformation matrix.
-
craigDH
public static Transform3f craigDH(float alpha, float a, float d, float theta)
Constructs a homogeneous transform using the Craig (modified)
Denavit-Hartenberg notation
- Parameters:
alpha
- [in]a
- [in]d
- [in]theta
- [in]
- Returns:
- the transformation matrix.
Note: The Craig (modified) Denavit-Hartenberg notation differs from
the original Denavit-Hartenberg notation.
-
identity
public static Transform3f identity()
Constructs the identity transform
- Returns:
- the identity transform.
-
makeLookAt
public static Transform3f makeLookAt(Vector3f eye, Vector3f center, Vector3f 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
-
P
public Vector3f P()
Gets the position part P from T
- Returns:
- the translation.
-
R
public Rotation3f R()
Gets the rotation part R from T.
- Returns:
- the rotation.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-