Package org.robwork.sdurw
Class Transform3d
- java.lang.Object
-
- org.robwork.sdurw.Transform3d
-
public class Transform3d extends java.lang.Object
A 4x4 homogeneous transform matrix.
-
-
Constructor Summary
Constructors Constructor Description Transform3d()
Default Constructor.
Initializes with 0 translation and Identity matrix as rotationTransform3d(long cPtr, boolean cMemoryOwn)
Transform3d(Transform3d t3d)
Transform3d(Vector3d position, Rotation3d rotation)
Constructs a homogeneous transform
Transform3d(Vector3d d, Rotation3DVectord 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 Transform3d
craigDH(double alpha, double a, double d, double theta)
Constructs a homogeneous transform using the Craig (modified)
Denavit-Hartenberg notation
void
delete()
static Transform3d
DH(double alpha, double a, double d, double theta)
Constructs a homogeneous transform using the original
Denavit-Hartenberg notation
static long
getCPtr(Transform3d obj)
static Transform3d
identity()
Constructs the identity transform
static Transform3d
makeLookAt(Vector3d eye, Vector3d center, Vector3d 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.Transform3d
multiply(Transform3d other)
Vector3d
multiply(Vector3d other)
Vector3d
P()
Gets the position part P from T
Rotation3d
R()
Gets the rotation part R from T.
java.lang.String
toString()
-
-
-
Constructor Detail
-
Transform3d
public Transform3d(long cPtr, boolean cMemoryOwn)
-
Transform3d
public Transform3d()
Default Constructor.
Initializes with 0 translation and Identity matrix as rotation
-
Transform3d
public Transform3d(Transform3d t3d)
-
Transform3d
public Transform3d(Vector3d position, Rotation3d rotation)
Constructs a homogeneous transform
-
Transform3d
public Transform3d(Vector3d d, Rotation3DVectord 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(Transform3d obj)
-
delete
public void delete()
-
multiply
public Transform3d multiply(Transform3d other)
-
DH
public static Transform3d DH(double alpha, double a, double d, double 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 Transform3d craigDH(double alpha, double a, double d, double 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 Transform3d identity()
Constructs the identity transform
- Returns:
- the identity transform.
-
makeLookAt
public static Transform3d makeLookAt(Vector3d eye, Vector3d center, Vector3d 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 Vector3d P()
Gets the position part P from T
- Returns:
- the translation.
-
R
public Rotation3d R()
Gets the rotation part R from T.
- Returns:
- the rotation.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-